Command to List all the list all directories from home directory?
-
ls -ltr
-
ls -ltr | grep "^d"
-
ls -a | grep "^l"
-
ls -ltr | grep "^l"
B
Correct answer
Explanation
The command ls -ltr | grep "^d" lists directory contents with long format, sorting by modification time in reverse order, and filters lines starting with d (which represents directories in Unix file permission strings). The other options filter by l (symbolic links) or do not filter for directories.