Oftentimes you will want to view the contents (subdirectories) of a directory but may not want to change directories. Why? Traversing deep directories takes valuable time.
Here's what you can do with the ls (list) command coupled with few options and then pipe the output to the more command.
#cd /home/esofthub
#ls -ltrR | more
This command syntax will allow you to view the contents in a long list format (l), in time order (t), reverse time sort order (r) and recursively (R). The more command will control the flow of the output.
Here's an example of what you will see.
#ls -ltrR | more
dir1
contents
dir2
contents
dir3
contents
dir4
contents
and soforth
This blog covers Unix system administration HOWTO tips for using inline for loops, find command, Unix scripting, configuration, SQL, various Unix-based tools, and command line interface syntax. The Unix OS supports tasks such as running hardware, device drivers, peripherals and third party applications. Share tips/comments. Read the comments. But most importantly: Read Disclaimer - Read Disclaimer.
No comments:
Post a Comment