Sponsored Content
Top Forums Shell Programming and Scripting Space hogging files and folders Post 302364679 by proactiveaditya on Friday 23rd of October 2009 04:03:35 PM
Old 10-23-2009
Thanks,

When running the following command:
Code:
du /var/ 2>/dev/null | sort -rn | head

I am getting the output:
Code:
41432328        /var/
19771516        /var/lib
15910316        /var/spool
15910188        /var/spool/mail
15796124        /var/lib/enswitch
5772612 /var/lib/enswitch/mailboxes
5725264 /var/log
5262072 /var/lib/enswitch/recordings
5211044 /var/lib/enswitch/recordings/sip
4639680 /var/lib/enswitch/backups

But when i am running the command:
Code:
du -h /var/ 2>/dev/null | sort -rn | head

I am getting the output:
Code:
1020K   /var/lib/enswitch/recordings/sip/989/940
1020K   /var/lib/enswitch/recordings/sip/934/177
1020K   /var/lib/enswitch/recordings/sip/896
1020K   /var/lib/enswitch/recordings/sip/828/262
1020K   /var/lib/enswitch/recordings/sip/574
1020K   /var/lib/enswitch/recordings/sip/564/910
1020K   /var/lib/enswitch/recordings/sip/540/758
1020K   /var/lib/enswitch/recordings/sip/438/264
1020K   /var/lib/enswitch/recordings/sip/425/287
1020K   /var/lib/enswitch/recordings/sip/301/566

I think i should have got the earlier output with the sizes in human readable form. But the output seems to be different. What is the reason?
Thanks in advance
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

VI hogging system resources???

Hello all. I was on my pc last night when I noticed that my hard drive light was on and when I typed in "uptime" I recieved some crazy load averages. load average: 3.30, 3.07, 2.95. Anyway I type in "top" to see what processes are being the resource hogs and im surprised as hell to see that one... (2 Replies)
Discussion started by: ThePreacher
2 Replies

2. Shell Programming and Scripting

removing old files except configuration files and folders

Dear all, I want to remove files older than 2 months in the /home/member directory. But except the configuration files (like .bash_profile .config/ .openoffice/ .local/ .kde/ etc..) I have tried with the command find . -mtime +60 -wholename './.*' -prune -o -print -exec mv {} \; but it... (1 Reply)
Discussion started by: jamcalicut
1 Replies

3. HP-UX

to get the timestamp of files from the files and folders in Unix

Hi, I had a directory and many subdirectories and files with in it. Now i want to get the timestamp of files from the files and folders recursively. :( Please help me to generate a script fort he above mentioned requirement! Appreciate for ur qick response Thanks in advance! ... (2 Replies)
Discussion started by: kishan
2 Replies

4. AIX

pconsole process hogging

AIX6.1 in topas 'pconsole" processing utilization showing high (48.1 %) in pgsp column what is pconsole process, can kill it Thanks in Advance (0 Replies)
Discussion started by: sunnybee
0 Replies

5. Shell Programming and Scripting

Compare 2 folders to find several missing files among huge amounts of files.

Hi, all: I've got two folders, say, "folder1" and "folder2". Under each, there are thousands of files. It's quite obvious that there are some files missing in each. I just would like to find them. I believe this can be done by "diff" command. However, if I change the above question a... (1 Reply)
Discussion started by: jiapei100
1 Replies

6. UNIX for Dummies Questions & Answers

Searching for folders/parent folders not files.

Hello again, A little while back I got help with creating a command to search all directories and sub directories for files from daystart of day x. I'm wondering if there is a command that I've overlooked that may be able to search for / write folder names to an output file which ideally... (2 Replies)
Discussion started by: Aussiemick
2 Replies

7. Shell Programming and Scripting

List all the files in the present path and Folders and subfolders files also

Hi, I need a script/command to list out all the files in current path and also the files in folder and subfolders. Ex: My files are like below $ ls -lrt total 8 -rw-r--r-- 1 abc users 419 May 25 10:27 abcd.xml drwxr-xr-x 3 abc users 4096 May 25 10:28 TEST $ Under TEST, there are... (2 Replies)
Discussion started by: divya bandipotu
2 Replies

8. Shell Programming and Scripting

Find folders with timestamp and disk space used

Hi, I want write a script that finds a set of folders written between a certain time and then find the disk space used by those folders. Can someone please help. Thanks, Sparcman:( (1 Reply)
Discussion started by: sparcman
1 Replies

9. UNIX for Dummies Questions & Answers

Copying folders with only certain files

Hello gurus, quick question I have a bunch of folders each having subfolders that have 3 files with the same name but different in content. So I want to copy the subfolders with only those 3 files to another location. Just making up some names here, Folder1 SubfolderX1 SubfolderY1 ... (1 Reply)
Discussion started by: ritakadm
1 Replies

10. Shell Programming and Scripting

How to copy files/folders and show the files/folders?

Hi, So i know we use cp -r as a basic to copy folders/files. I would like this BUT i would like to show the output of the files being copied. With the amazing knowledge i have i have gone as far as this: 1) find source/* -exec cp -r {} target/ \; 2) for ObjectToBeCopied in `find... (6 Replies)
Discussion started by: Imre
6 Replies
UPDATE-RCCONF-GUIDE(8)						 Debian GNU/Linux					    UPDATE-RCCONF-GUIDE(8)

NAME
update-rcconf-guide - Create default guide file for rcconf SYNOPSIS
update-rcconf-guide DESCRIPTION
Update-rcconf-guide creates the default guide file which rcconf uses. Update-rcconf-guide searches the package names corresponding to each service file in /etc/init.d directory from dpkg info files(/var/lib/dpkg/info/*.list) and get the description of these packages using apt-cache. Update-rcconf-guide uses Short-Description in priority to the description if service files has Short-Description field. Update-rcconf-guide writes those results to /var/lib/rcconf/guide.default file. You can write your own guide in user guide file(/var/lib/rcconf/guide) by hand. Rcconf refers Guides in /var/lib/rcconf/guide before those in /var/lib/rcconf/guide.default. If you install some packages after executed update-rcconf-guide, you need to re-create this file using update-rcconf-guide so as to refresh guide.default that includes new guides for installed new services. Notice: update-rcconf-guide was not executed when you installed rcconf package. FILE
/var/lib/rcconf/guide.default Guide File update-rcconf-guide generates. /var/lib/rcconf/guide Guide File user(Administrator) can define. SEE ALSO
rcconf(8) AUTHOR
Atsushi KAMOSHIDA <kamop@debian.org> perl v5.10.1 2009-01-21 UPDATE-RCCONF-GUIDE(8)

Featured Tech Videos

All times are GMT -4. The time now is 05:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy