- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: du command problem
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2009 10:46 PM
02-21-2009 10:46 PM
du command problem
my problem is i can not doing du -sk command for the /opt file system on this server but i can do that (du -sk ) on /var for example on the same server . /opt increases and it reached to 89% and i didn't know what is the cause? so i need to do this command . note : if i made du -sk *| morethis message appered to me illegal option --p thank you alot
- Tags:
- option
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2009 02:22 AM
02-22-2009 02:22 AM
Re: du command problem
can you please post the O/Ps of
#du -sk /var
#du -sk /opt
#bdf
regards
sujit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2009 03:49 AM
02-22-2009 03:49 AM
Re: du command problem
ls -lb should gibe you an idea.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2009 03:51 AM
02-22-2009 03:51 AM
Re: du command problem
If you have a file named "-p" then this will be put in place of the asterisk, and the command becomes:
# du -sk -p | more
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2009 05:10 AM
02-22-2009 05:10 AM
Re: du command problem
As confirmed above you might have entered
$ du -ks -p
du: illegal option -- p
usage: du [-a|-s] [-kbrx] [-t type] [name ...]
$
>> Please execute again and let us know the error which you are getting
# /usr/bin/du /opt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2009 09:59 AM
02-22-2009 09:59 AM
Re: du command problem
Here is what happened: the "*" was expanded by the shell (as it always does) to place all the names of the files and directories in your current working directory. It is very important to understand how the shell rewrites your command line. Your current directory contains a file with the name "-p" which produced the error. Try this same command (without the | more) like this:
echo du -sk *
You will see what the du command will see -- a list of all the filenames in your current directory. Since du always descends into the subdirectories, you dop not need "*". Just use either of these commands:
du -sk /opt
or
cd /opt
du -sk
However, since you are looking for unexpected space usage, you should use this command:
du -kx /opt | sort -rn | head -20
This will show you the largest directories, which is better than showing a summary of all the directories in alphabetical order.
Unexpected growth in /opt usually means there may be some logfiles stored there -- not a good place. When you find logfiles, either configure the applications that created them to put them in /var/opt, or replace the logfile with a symbolic link to /var/opt/.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2009 10:33 AM
02-22-2009 10:33 AM
Re: du command problem
rm -i ./--p
You could also use: du -kxs -- *
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2009 12:09 AM
02-23-2009 12:09 AM
Re: du command problem
thank you , my thread has been closed .
I found the directory clled -p ander fs /opt and when removed it i could apply du comand .
with my regards
Manal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2009 02:53 AM
02-23-2009 02:53 AM
Re: du command problem
>>thank you , my thread has been closed
If you think your problem got solved then please assign points who give there precious time for your problem.
Suraj