[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Did I found a bug in "ls"?
From: |
Major Péter |
Subject: |
Did I found a bug in "ls"? |
Date: |
Sun, 08 Mar 2009 16:15:16 +0100 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20090105) |
Hi!
I would like to list some folders with they block-sizes, but only
specific folders am I interested.
So I would like to use find to list the correct folders for me:
ls `find . -type d -user foo -name "*"`
this is not working because ls can't find folders with spaces in there
name, so I am using a pipe and sed, to make it comfortable:
ls `find . -user major -type d -name "*" | sed 's,\ ,\\\ ,g'`
If I'm using echo instead ls, the output is:
./foo\ bar
So I tried to use:
ls ./foo\ bar
And it worked!
The easiest way to check this is using this command in a folder where
are folders with spaces in they names:
ls `ls -a | sed 's,\ ,\\\ ,g'`
Is there may an other way to find out the folders block-size belonging
to a specific user?
Thanks for your help.
Regards,
Peter Major
- Did I found a bug in "ls"?,
Major Péter <=
Re: Did I found a bug in "ls"?, James Youngman, 2009/03/08