output from ls command
Dear Gurus,
I am trying to make a text file from the contents of multiple directories with one command.
I have spent quite some time looking at SED, AWK, and LS ofcourse, but i can not get the output the way i desire.
What i need is this :
/home/user/download/imnuts.mp3
/home/user/download/movie.mpg
/home/user/other/other.txt
/home/user/mnt/totallydifferent/strange.txt
but all im getting right now is this :
/home/user/download :
imnuts.mp3
movie.mpg
/home/user/other :
other.txt
/home/user/mnt/totallydifferent:
strange.txt
It is frustrating me, i have browsed the entire forum (almost) and looked at tutorials on the internet, but i can't get it done.
The problem seems to be that i want multiple directories listed, and all the files listed below one another. If i do it with one directory like this : ls -lm1UAF /home/user/download/ i do get the desired format, however i want the names of the directories NOT to be listed, only file names with full path.
Basically i just want all the files in a tree, NO directorie-names, listed line by line, the full path. I want to use this file to import the files in a database.
If anyone can give me a hand i would appreciate it very much.
|