[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: geting some file stat
Ronald Roskens skrev:
On Tue, 2008-02-19 at 23:39 +0100, Johnny Billquist wrote:
Aleksey Cheusov skrev:
And of course that *will* be a problem if he has a large number of files, since
there are limits on how long lines are acceptable...
Thanks all for your help,
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"
No there won't be a problem with a large number of files. Xargs knows
how to handle these things. It uses the sysconf _SC_ARG_MAX to set a
maximum buffer allowed for the command + arguments. If you want to set
it to something smaller, you can specify it on the commandline with -s
Hey! That was a new one to me. Very nice!
You learn new something every day... :-)
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt%softjar.se@localhost || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
Main Index |
Thread Index |