[opensuse] How to list size, date and file name with ls?
Hello: How can I list files with ls showing file size, date and file name? I would like to see something as with the ls -l option but without permission, user name and group name info. I tried -g and -G options to suppress owner and group info, but could not find out how to disable permissions info. And what is the difference between -o and -G options? Thanks in advance. Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 07/04/2010 11:58, Istvan Gabor wrote:
Hello:
How can I list files with ls showing file size, date and file name? I would like to see something as with the ls -l option but without permission, user name and group name info.
I tried -g and -G options to suppress owner and group info, but could not find out how to disable permissions info. And what is the difference between -o and -G options?
Thanks in advance.
Istvan
Hi Istvan, You can by using a combination of ls and awk: ls -l | awk '{ print $2, $5, $6, $7, $8, $9 }' HTH, Phil -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
2010. április 7. 18:15 napon Phil Savoie <psavoie1783@rogers.com> írta:
On 07/04/2010 11:58, Istvan Gabor wrote:
Hello:
How can I list files with ls showing file size, date and file name? I would like to see something as with the ls -l option but without permission, user name and group name info.
I tried -g and -G options to suppress owner and group info, but could not find out how to disable permissions info. And what is the difference between -o and -G options?
Thanks in advance.
Istvan
Hi Istvan,
You can by using a combination of ls and awk:
ls -l | awk '{ print $2, $5, $6, $7, $8, $9 }'
Thank you. I thought there would be a combination of options that would give the same result. Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thu, 08 Apr, 2010 at 17:20:10 +0200, Istvan Gabor wrote:
2010. április 7. 18:15 napon Phil Savoie <psavoie1783@rogers.com> írta:
Hi Istvan,
You can by using a combination of ls and awk:
ls -l | awk '{ print $2, $5, $6, $7, $8, $9 }'
Thank you. I thought there would be a combination of options that would give the same result.
Istvan
I don't see a way with 'ls' alone. Depending on the purpose, you might have a look at 'stat' instead: /usr/bin/stat --printf "%s\t%y\t%n\n" * will give you "size (in bytes)", "modify time (with 9 decimal places of... 'ticks'?), "filename" /jon -- YMMV -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Jon Clausen wrote:
On Thu, 08 Apr, 2010 at 17:20:10 +0200, Istvan Gabor wrote:
2010. április 7. 18:15 napon Phil Savoie <psavoie1783@rogers.com> írta:
Hi Istvan,
You can by using a combination of ls and awk:
ls -l | awk '{ print $2, $5, $6, $7, $8, $9 }'
Thank you. I thought there would be a combination of options that would give the same result.
Istvan
I don't see a way with 'ls' alone.
Depending on the purpose, you might have a look at 'stat' instead:
/usr/bin/stat --printf "%s\t%y\t%n\n" *
Alternatively, 'find' might be useful. -- Per Jessen, Zürich (5.9°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (4)
-
Istvan Gabor
-
Jon Clausen
-
Per Jessen
-
Phil Savoie