Hi All,
I want to redirect only the file names to a new file from the ls -ltr directroy. how Can i do it.
my ls -ltr output will be as below.
-rwxr-xr-x 1 118 103 28295 Jul 26 2006 event.podl
-rwxr-xr-x 1 118 103 28295 Jul 26 2006 xyz.podl
I want my new file to have only event.podl . and xyz.podl
Pls Suggest.
You don't answer to the OP requirement.
That would be
ls -1tr > test.txt
(note that's dash one, not dash ell) but "-1" is unnecessary as ls knows the output is not a terminal so displays one file per line anyway. Franklin52 got it.