Re: BASH issue with spaces in file names..
- From: Laurianne Gardeux <lg@xxxxxxxxxxxx>
- Date: 04 Dec 2008 08:55:12 GMT
Le Thu, 04 Dec 2008 08:08:05 +0100, Bill Marcum a écrit :
On 2008-12-04, Laurianne Gardeux <lg@xxxxxxxxxxxx> wrote:
du doesn't use standard input.
No need of 'ls'.
du -hcs
does the job.
But if you really need the 'ls' command, you can take a pipe:
ls -1 | du -hcs
ls | xargs du -hcs
The "-1" argument isn't necessary, because ls produces output in one
column when its standard output isn't a terminal.
Uups. Thank you for the correction. I have testded the wrong commande
above in a test-directory but 'ls' dosn't returned a error-message. So
'du' does the job fine without 'ls'. I expected something like "ls: write
error: cannot connect (pipe)". Is it possible that this error-message is
olny a feature of bash-builtins?
LG
.
- References:
- BASH issue with spaces in file names..
- From: amrahd
- Re: BASH issue with spaces in file names..
- From: Laurianne Gardeux
- Re: BASH issue with spaces in file names..
- From: Bill Marcum
- BASH issue with spaces in file names..
- Prev by Date: Re: BASH issue with spaces in file names..
- Next by Date: Re: BASH issue with spaces in file names..
- Previous by thread: Re: BASH issue with spaces in file names..
- Next by thread: Re: BASH issue with spaces in file names..
- Index(es):
Relevant Pages
|
Loading