Get "ls -l" to return with full dir path

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

littleIdiot

Thread Starter
Joined
Jan 11, 2006
Messages
2
All I want is to have a full listing of my directory (and ideally those below it), and for the result to contai the full path of each file returned.

For example, I currently get the following (with some edits made) :

$ pwd
/home/nlthoa
$ ls -lart
-rw-rw---- 1 nlthoa u032144 36473021 Jan 11 15:32 file_01.txt
-rw-rw---- 1 nlthoa u032144 36552704 Jan 11 15:36 file_02.txt
-rw-rw---- 1 nlthoa u032144 5137 Jan 11 15:39 file_03.txt


and I want to see the following:

$ pwd
/home/nlthoa
$ [your clever little command here]
total 142985
/home/nlthoa/file_01.txt
/home/nlthoa/file_02.txt
/home/nlthoa/file_03.txt


Any ideas?

Thanks in advance,
lil'
 
Joined
Jun 15, 2005
Messages
431
The ls command is not the one you want.

Try:

find $(pwd) -depth
or
find `pwd` -depth

This command will print the directory names as well as regular files, but you can use the
"-type" option to find to only print files of a certain type.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top