Full Directory Listing...


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Full Directory Listing...
# 1  
Old 05-11-2006
Full Directory Listing...

Is there a way of listing everything under a directory.

So for example if you wanted to know everything under the USR directory you would get all the sub directories and files in those directories as well as the file directly under the USR directory. I would imagine that you could do this using an ls - a switch.

Anyone any ideas?

Thanks for reading,

Mark
# 2  
Old 05-11-2006
you mean recursive listing

Recursive listing option is -R
ls -R
# 3  
Old 05-11-2006
That brill thanks...
# 4  
Old 05-11-2006
Is there any way of showing that paths of the files/directories as well?
# 5  
Old 05-11-2006
You could try

find /usr -name "*" -exec ls -l {} \;

where /usr is the area you wish to search, use ./ to everything below the directory you are in.
# 6  
Old 05-11-2006
Thanks that works well...
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Extract directory name from the full directory path in UNIX using shell scripting

My input is as below : /splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt /splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt /splunk/scrubbed/loyal/IFIND.HELLO.WROC.txt /splunk/scrubbed/triumph/ifind.triumph.txt From the above input I want to extract the file names only . Basically I want to... (5 Replies)
Discussion started by: IshuGupta
5 Replies

2. Shell Programming and Scripting

Directory listing

Hi, I have a directory with a bunch of files say around 150K. I want the directory's path and the filenames printed to a text file. Example: If I am in the directory /path/test and the files in this directory are My output file should be like this Thanks in advance ----------... (4 Replies)
Discussion started by: jacobs.smith
4 Replies

3. Windows & DOS: Issues & Discussions

DOS Dir - listing of full path and timestamp

Hi, (Apologies, I'm sure I'm not the first person to raise this question but so far in my searches haven't found a good answer). I would like to output a listing per line of filename (including full path) and 'last updated' timestamp. e.g: Z:\dir1\file1.txt 01/02/2010 10:43... (5 Replies)
Discussion started by: GM_AIX
5 Replies

4. UNIX for Dummies Questions & Answers

Full ps output listing ... what option?

Hi all, Can someone please advise how to get the full listing of a process using the ps command? Or is this not possible and I can only do this only by process ID? Output am wanting to have is similar to when running /usr/ucb/ps -auxwww but preferably using "traditional" ps command that I... (1 Reply)
Discussion started by: newbie_01
1 Replies

5. Shell Programming and Scripting

Directory Listing Help

i have searched through this site and have found some useful information but i'm struggling with one thing. In my script i am created a start and end file so I can get a listing of the files within those two files. However I want to exclude any sub-directories in this listing. Below are the... (8 Replies)
Discussion started by: J-DUB
8 Replies

6. UNIX for Dummies Questions & Answers

Listing files with full path

Hi, I need to store all the files in a directory to a text file with its full path. The example below can explain: ./File1.txt ./File2.txt ./Folder1/File11.txt ./Folder1/File12.txt ./Folder1/Folder11/File111.txt ./Folder2/file21.txt : : The ls -R1 command won't give the result as... (5 Replies)
Discussion started by: r_sethu
5 Replies

7. UNIX for Dummies Questions & Answers

Listing full file names with the exact length of 3 characters

This is what I have to do: Display the full file name (including the full path) and file size of all files whose name (excluding the path) is exactly 3 characters long. This is the code I have: find / -printf "Name: %f Path: %h Size: %s (bytes)\n" 2>/dev/null | grep -E "Name: .{3,} Path" |... (7 Replies)
Discussion started by: Joesgrrrl
7 Replies

8. UNIX for Dummies Questions & Answers

How can i get directory listing?

Hai friends is there any command in unix that display only directories... (I have 5 directories in my home directory, and i also have some files along with directories...But when i tried to show the directory listing using the command ls -d i wasn't presented by the directory listing...Please... (2 Replies)
Discussion started by: haisubbu
2 Replies

9. UNIX for Dummies Questions & Answers

Timestamp in directory listing

Hi, I need a help. I want to see all the files in the directory with the Time Stamp. I use the following command. $ls -lt This displays the files with time stamp, but not all the files. Only last few months, the files are displayed with timestamp, the old files are only have dates. ... (2 Replies)
Discussion started by: vijashok
2 Replies

10. UNIX for Dummies Questions & Answers

Recursive directory listing without listing files

Does any one know how to get a recursive directory listing in long format (showing owner, group, permission etc) without listing the files contained in the directories. The following command also shows the files but I only want to see the directories. ls -lrtR * (4 Replies)
Discussion started by: psingh
4 Replies
Login or Register to Ask a Question