- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to check the disk space of any directory or su...
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
Discussions
Discussions
Discussions
Forums
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
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
тАО07-22-2001 11:43 PM
тАО07-22-2001 11:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-22-2001 11:56 PM
тАО07-22-2001 11:56 PM
Re: How to check the disk space of any directory or subdirectory?
Use the du or df command ( du /etc or df /etc).
Last line will be summary line in OS-blocks.
Multiply this with the blocksize and you have the result in bytes or kB.
Rgds
Alexander M. Ermes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-22-2001 11:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-22-2001 11:57 PM
тАО07-22-2001 11:57 PM
Re: How to check the disk space of any directory or subdirectory?
#df -k gives disk details of all the existing filesystems.
If you want particular directory or subdirectory
for e.g for /var
#df -k /var
for subdirectory /var/yp
#df -k /var/yp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2001 12:20 AM
тАО07-23-2001 12:20 AM
Re: How to check the disk space of any directory or subdirectory?
"df /tmp", "df /tmp/subdir1" and "df /tmp/subdir1/subdir2" will return the same output if the subdirectories are on the same mountpoint.
"du -s" on the other hand, compute the space used in the directory and subdirectories (if "-s" is specified) specified.
regards,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2001 12:26 AM
тАО07-23-2001 12:26 AM
Re: How to check the disk space of any directory or subdirectory?
or
du -k /dir_to_check, to display the space occupied by the subdirs and dir.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2001 12:47 AM
тАО07-23-2001 12:47 AM
Re: How to check the disk space of any directory or subdirectory?
Then how to check how much space remained, how much used in a particular sudirectory?like
/home/username/subdir1/subdir2?
Regards!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2001 01:25 AM
тАО07-23-2001 01:25 AM
Re: How to check the disk space of any directory or subdirectory?
$du -sk /home/user/dir/subdir
you can use * to check all the subdirectory of one directory !
$du -sk /home/user/dir/*
The directory has no concept for free disk space , all dir share the disk space of the file system ,so you just only use "bdf" to get the free disk space of a file system .
Frank.