We help IT Professionals succeed at work.

disk usage

AnuPutcha
AnuPutcha asked
on
Medium Priority
491 Views
Last Modified: 2010-04-21
I am able to say du -sh * from the $WORK dir and get a sum for all the dir's and files but if I go down 1 level to $WORK/migi_tests
and give the same cmd, it does not work,

% cd migi_tests/
% du -sh *
du: invalid option -- v
du: invalid option -- e
du: invalid option -- .
du: invalid option -- f
du: invalid option -- i
du: invalid option -- v
du: invalid option -- e
du: invalid option -- .
du: invalid option -- p
du: invalid option -- v
du: invalid option -- e
du: invalid option -- .
du: invalid option -- r
du: invalid option -- p
du: invalid option -- t
Try `du --help' for more information.

what is different between the dir's?
Comment
Watch Question

Top Expert 2005
Commented:
He he, some folders are named with starting dash, eg: -ve ;)
du -sh -- *

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
can you explain what would this -- do after du -sh to -ve kind of files/dir's? Just want to understand the mechanism.
Top Expert 2005

Commented:
-- says that it's end of flags, and next arguments are regular arguments. In that case filenames.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.