LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-01-2007, 09:56 AM   #1
young_rhkid
LQ Newbie
 
Registered: Feb 2007
Posts: 11

Rep: Reputation: 0
du -sh * Command not working


I commonly use the following command 'du -sh *' to get a line item list of all items in a user's account. It has always worked but now I try the same command and the command line gives me:

[root@xxxx useraccount]# du -sh *
du: invalid option -- i
Try `du --help' for more information.

The server in question is using > 'Red Hat Linux release 7.3'

Any idea why I am getting this or how to reset this command?
 
Old 10-01-2007, 10:49 AM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,506

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Quote:
Originally Posted by young_rhkid View Post
[root@xxxx useraccount]# du -sh *
du: invalid option -- i
Try `du --help' for more information.
Since you did not pass the option i to the du command, it looks like you have a file called "-i" in the working directory. If this is the case you can try
Code:
du -sh -- *
The -- sign will end the list of options, that is all the arguments after -- are not interpreted as options! This is true for many *nix commands.
 
Old 10-01-2007, 10:57 AM   #3
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Also, check to see if the command hasn't become aliased to something:
Code:
which du
or
Code:
alias|grep du
 
Old 10-01-2007, 11:51 AM   #4
young_rhkid
LQ Newbie
 
Registered: Feb 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks guys! The '--i' option did the trick!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
at command not working??? sulekha Ubuntu 2 07-27-2007 01:17 PM
exec command not working suruchi Linux - Software 2 06-12-2006 01:02 AM
groups command not working.. samills70 Linux - Newbie 2 06-11-2004 05:22 AM
su command not working dahmad Linux - Newbie 6 02-28-2003 12:08 AM
ps command not working slackerboy Slackware 2 08-22-2002 11:01 PM


All times are GMT -5. The time now is 01:53 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration