- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Does the du command show hidden files?
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
тАО05-24-2004 02:43 AM
тАО05-24-2004 02:43 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2004 02:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2004 02:53 AM
тАО05-24-2004 02:53 AM
Re: Does the du command show hidden files?
find . -type f -exec du -skr {} \;
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2004 02:54 AM
тАО05-24-2004 02:54 AM
Re: Does the du command show hidden files?
# du -ak
where
-a Print entries for each file encountered
in the directory hierarchies in
addition to the normal output.
-k Gives the block count in 1024-byte
blocks.
For further information "man du".
Regards, Ernesto.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2004 02:55 AM
тАО05-24-2004 02:55 AM
Re: Does the du command show hidden files?
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2004 02:56 AM
тАО05-24-2004 02:56 AM
Re: Does the du command show hidden files?
In order to get du to pick up the '.*' files and directories you must modify you du command.
Something like this would work:
# du -ks * .[a-zA-Z]*
The .[a-zA-Z]* will get only dot-files that start with upper or lower case a-z. If you have dot-files that start with numbers you could do it like .[a-zA-Z0-9]* You don't want to do just .* as that will get the .. directory which will go down thru the parent directory which would not be good.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2004 03:35 AM
тАО05-24-2004 03:35 AM
Re: Does the du command show hidden files?
du -a -k
command, it will list files and directory's giving the appearance of double totals:
0 ./lost+found
0 ./.AgentSockets/A
4134 ./.AgentSockets/dah
4134 ./.AgentSockets
2 ./rpcbind.file
Whereas, the find command (find . -type f -exec du -sk {} \;) will give you just files:
4134 ./.AgentSockets/dah
2 ./rpcbind.file
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2004 03:42 AM
тАО05-24-2004 03:42 AM
Re: Does the du command show hidden files?
And you can try this:
find /tmp -type f -exec du -k {} \; | awk 'BEGIN {totsize=0;totcnt=0;} {totsize+
=$1;totcnt+=1;} END {print totcnt,"files consuming",totsize,"blocks";}'
live free or die
harry