Search for big file size only in root fs


 
Thread Tools Search this Thread
Operating Systems Solaris Search for big file size only in root fs
# 1  
Old 11-12-2009
Search for big file size only in root fs

Hi all,
I'm working on Solaris and quite often I receive the alert message of file system at 90%.

I'd like to find which files caused this happens (at least the biggest files) with the following command:

Code:
find . -size +10000000c -exec ls -larth {} \;

This looks for every file in every fs ... I just want to check "/" fs or "/var/" etc...!

Any ideas?

Thank you very much for your support!
# 2  
Old 11-12-2009
-xdev is the option you are looking for, it seems.

Code:
       
man find
.....
.....
-xdev  Don't descend directories on other filesystems.

Also, this could be a better version of finding 5 most biggest files:
Code:
find . -type f -exec ls -s {} \; | sort -n -r | head -5

# 3  
Old 11-12-2009
Thank you very much thegeek, this fits exactly my needs.

Regards,
Evan
# 4  
Old 11-12-2009
cd /
du -sk * | sort -rn |head
# 5  
Old 11-15-2009
du -a /var | awk '$1 > 1000000 { print }' <--- not 1megabyte rather any files found larger than "7" digits.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Optimised way for search & replace a value on one line in a very huge file (File Size is 24 GB).

Hi Experts, I had to edit (a particular value) in header line of a very huge file so for that i wanted to search & replace a particular value on a file which was of 24 GB in Size. I managed to do it but it took long time to complete. Can anyone please tell me how can we do it in a optimised... (7 Replies)
Discussion started by: manishkomar007
7 Replies

2. Red Hat

Increase root file system size ...

Hello Admins, I am running a redhat linux 5 on vmware workstation. I need to increase or add some more space to my root (/) partition. I don't have any LVM configured.. Please suggest. # df -kh Filesystem Size Used Avail Use% Mounted on /dev/sda2 3.8G 3.1G ... (4 Replies)
Discussion started by: snchaudhari2
4 Replies

3. Shell Programming and Scripting

Search for file and size subdirectory as well

Hi I made this code to search in directory for file and size How can I remodel it to seach in the sub direcotry as well Thanks #!/bin/bash echo -n "Enter: " read var if then echo "Directory exists: ${var}" size=`du -hs "${var}"` echo The size of the current folder is... (4 Replies)
Discussion started by: lio123
4 Replies

4. HP-UX

Empty Directory, big size

Hello, Can you please explain why I have various empty directories with large size ? OS is B.11.11 (3 Replies)
Discussion started by: drbiloukos
3 Replies

5. UNIX for Dummies Questions & Answers

Empty Directory, big size

Hello, Can somebody please explain why I have EMPTY directories on HP-UX with BIG SIZE ? Thank you ! Double post, continued here (0 Replies)
Discussion started by: drbiloukos
0 Replies

6. Shell Programming and Scripting

Print #of lines after search string in a big file

I have a command which prints #lines after and before the search string in the huge file nawk 'c-->0;$0~s{if(b)for(c=b+1;c>1;c--)print r;print;c=a}b{r=$0}' b=0 a=10 s="STRING1" FILE The file is 5 gig big. It works great and prints 10 lines after the lines which contains search string in... (8 Replies)
Discussion started by: prash184u
8 Replies

7. Solaris

reducing to root file size

My root file size has reached 80% and I am looking where all i can reduce the file size . Here is the output of top directories in / . To me none of this looks useful but not sure . We use an appplication and email. Which all can be deleted . Please advise . 2016989 989445 /var 930059 ... (2 Replies)
Discussion started by: Hitesh Shah
2 Replies

8. Solaris

increase root file system size in solaris

Hi frnz, Need an urgent help... I have installed solaris 8 in a sunblade workstation with 136GB hdd. While installation it has taken a default filesystem size as 1.37GB for root. AFtr completing the installation i have extended the root partition to 130GB. But still df output shows... (4 Replies)
Discussion started by: sriram.s
4 Replies

9. Shell Programming and Scripting

bash script working for small size files but not for big size files.

Hi, I have one file stat. Stat file contents are as follows: for example. H50768020040913,00260100,507680,13,0000000643,0000000643,00000,0000 H50769520040808,00260100,507695,13,0000000000,0000000000,00000,0000 H50770620040611,00260100,507706,13,0000000000,0000000000,00000,0000 Now i... (1 Reply)
Discussion started by: davidpreml
1 Replies

10. Shell Programming and Scripting

Finding EOL char is there or not in a big size file

Hi, I am using ksh. I have to find wether data file has EOL or not. as per my knowledge we can easily find by checking each character. But this is a tedious job as per my requirement because my data file size is very big . It may be in 25-30 MB. So please advice me how i can check wether... (4 Replies)
Discussion started by: HariRaju
4 Replies
Login or Register to Ask a Question