Which of the following commands is used to obtain a list of all files by modification time? A. ls -1 B. ls -t C. ls -i D. ls -R E. None of the above

[amp_mcq option1=”ls -1″ option2=”ls -t” option3=”ls -i” option4=”ls -R E. None of the above” correct=”option2″]

The correct answer is B. ls -t.

The ls command is used to list the contents of a directory. The -t option sorts the list by modification time, with the most recently modified files listed first.

The -1 option lists each file on a separate line.

The -i option lists each file’s inode number.

The -R option lists the contents of subdirectories recursively.

None of the above options will list the files by modification time.

Exit mobile version