Click to See Complete Forum and Search --> : LS Bash Script help


solar_gateway
10-05-2003, 03:41 AM
Ok im trying to list directorys recursive with the dir/file on every line.

LIKE THIS

/work/doc.png
/work/doc2.png
/work/doc3.png
/work docs/old.png
/work docs/old2.png


NOT LIKE THE NORMAL RECURSIVE WAY
ls -R

./work docs:
doc.png doc2.png doc3.png

./work docs/old
old.png old2.png

---------------------------
ok so what do i do people. I thought maybe echo $PWD on every line but i couldnt figure it out...

Anyone got suggestions???

thanks

scinerd
10-05-2003, 09:39 AM
wrong tool for this use find. So to do what you want you would say "find /work*" and it would show all files and thier full path. This will show the contents of every directory that starts with work in / . You can also limit what shows up with options.