[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: geting some file stat
On Wed, 20 Feb 2008 00:33:18 +0200
Aleksey Cheusov <cheusov%tut.by@localhost> wrote:
> > Thanks all for your help,
> > indeed
> > stat -f "%Mp%Lp:%u:%g:%N"
> > does the trick
> > On Tue, Feb 19, 2008 at 02:26:10PM -0600, Robby Griffin wrote:
> >> Don't forget you can stat multiple files, too:
> >> stat -f "%N %u %g %Mp%Lp" filename1 filename2 ...
> > but I have a *large* number of files.. and would expect a shell
> > error using them all on one line...
> cat file_list.txt | xargs stat -f "%N %u %g %Mp%Lp"
args stat -f "%N %u %g %Mp%Lp" <file_list.txt
if all of the names are in one file.
One thing to be wary of: files with special characters in their names.
If you're generating the list via find, use -printx instead of -print.
--Steve Bellovin, http://www.cs.columbia.edu/~smb
Main Index |
Thread Index |