Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File listing using Cygwin

Status
Not open for further replies.

flotsam

MIS
Mar 16, 2004
12
US
I am trying to generate an output file for management that contains neatly formatted information on files residing on a 2000 file server.
I am running cygwin (bash 2.05b.0), on a 2000 pro box.
I have tried a few different things:
Code:
 ls -ohRSt1 --color | grep -G '[i]somefileextension[/i]' >outputfile.txt
and numerous variations, some piping into sort, etc.
the problem is that this doesn't give me quite what I am looking for, but it is close.

Is there an option to print the entire path to each file?
Is there a way to not print the access rights?

Is there a completely simpler way to do this?

Thanks,
Flotsam
 
how about using find instead of ls. just run 'find' on any directory and check it out. man find also.

Fernando
 
Or use ask or sed to insert the path by writting a script that checks $PWD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top