Web Hosting Talk







View Full Version : how to list files in a directory and all subdirectories in red hat command line?


recko11
11-22-2004, 06:21 PM
I want to show a detailed listing including permissions of all files and folders in /home and have it list files inside sub folders like /home/test7 and whatnot.

What would the command line be?

ReBoot
11-22-2004, 07:06 PM
-a list hidden files
-d list the name of the current directory
-F show directories with a trailing '/'
executable files with a trailing '*'
-g show group ownership of file in long listing
-i print the inode number of each file
-l long listing giving details about files
and directories
-R list all subdirectories encountered
-t sort by time modified instead of name

ReBoot
11-22-2004, 07:25 PM
excute this cmd
ls -lRa /home

if you have a alot of dirs you can add the result to a file by

ls -lRa /home >>/root/listalldirs.txt


regards

learnerman
11-23-2004, 07:20 AM
plz see man ls

if you have many dirs ...type

ls -lRa | more

then to see the other contents just hi spacebar

thnx