Skip to content

Commit b9e24ae

Browse files
committed
Fix script-04.sh solution.
1 parent 6187899 commit b9e24ae

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

individual-shell-tools/ls/script-04.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ echo "First exercise (sorted newest to oldest):"
1616
# TODO: Write a command which lists the files in the child-directory directory, one per line, sorted so that the most recently modified file is first.
1717
# The output should be a list of names in this order, one per line: helper-3.txt, helper-1.txt, helper-2.txt.
1818

19-
ls -t child-directory
19+
ls -1t child-directory
2020

2121

2222
echo "Second exercise (sorted oldest to newest):"
2323

2424
# TODO: Write a command which does the same as above, but sorted in the opposite order (oldest first).
2525
# The output should be a list of names in this order, one per line: helper-2.txt, helper-1.txt, helper-3.txt.
2626

27-
ls -rt child-directory
27+
ls -1rt child-directory

0 commit comments

Comments
 (0)