how to find a job which is writing a big file and eating up space?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to find a job which is writing a big file and eating up space?
# 1  
Old 03-13-2011
how to find a job which is writing a big file and eating up space?

how to find a job which is writing a big file and eating up space?
# 2  
Old 03-13-2011
Find the big file first, assume /path points to the filesystem being chewed up:
Code:
find /path -mtime -1 -exec ls -l {} \;

Look over the output. Find a giant file.
Then use lsof or fuser to get the process that has the file open.
# 3  
Old 03-13-2011
Question Not working

Can you please check again I am getting long list of smaller as well as bigger files
# 4  
Old 03-13-2011
I cannot know what is "big"

This is a pure guess: the -size [value] predicate for find allows you to specify exact, minimum or maximum values in blocks.

Code:
find /path -mtime -1 -size +20000 -exec ls -l {} \;

This finds new file > 20000 blocks

This finds file that are being updated right now
Code:
touch dummy
sleep 30  # wait 30 seconds
find /path -size +10000 -type f -newer dummy -exec ls -l {} \;

This finds files newer than 30 seconds
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find big file include current date

Hi, I want to put script. The script is to show file that larger than 100MB include current date (eg: today date). After find the date, it will compress list file and split the tar.gz file. Any idea how to do that? This bash script will run auto everyday. It's will transfer will to other... (12 Replies)
Discussion started by: mzainal
12 Replies

2. Shell Programming and Scripting

Find File with space

Hello All, I have path /allcode/mainld/process/recenttmp where I get many type of file from other platforms. so in UNIX I need to process all file present in this location. but I don't want to process files with the space and delete them. Please provide your suggestion. (7 Replies)
Discussion started by: kumar30213
7 Replies

3. Solaris

Space problem writing to Solaris Folder

Hello, I've got a process failure which says it may be caused by insufficient space in the directory. Is there a way I can tell what the maximum allowable size is? I've done df -k and there are no file systems over 45% so if it is a space problem it's confined to the sub directory. (4 Replies)
Discussion started by: Grueben
4 Replies

4. Shell Programming and Scripting

How to include a space or an IFS when writing to a file?

I'm working on my little Script that writes two pieces of data at a time, with different variables, vendor and alias, to a file. I can't seem to figure out how to separate them with a space, tab, or some other kind of separator so I can read them individually from the file at a later time. Can... (3 Replies)
Discussion started by: Straitsfan
3 Replies

5. UNIX for Dummies Questions & Answers

How big is too big a config.log file?

I have a 5000 line config.log file with several "maybe" errors. Any reccomendations on finding solvable problems? (2 Replies)
Discussion started by: NeedLotsofHelp
2 Replies

6. Shell Programming and Scripting

find file with space and cksum

find . -type f | xargs cksum this command is failing for the files which has a space in between them any quick solution ? preferably one liner (2 Replies)
Discussion started by: reldb
2 Replies

7. UNIX for Dummies Questions & Answers

Help writing a script to find a file

I just started learning about Unix and I cant figure out what im doing wrong. I'm trying to write a script that will ask for the file name and tell what type it is. This is what i have so far. http://i63.photobucket.com/albums/h123/wacand/untitled.jpg (2 Replies)
Discussion started by: wacand
2 Replies

8. UNIX for Dummies Questions & Answers

How to find a file whick is consuming larger disk space in file system

Hello, Can anybody please tell me the command to find out the filesystem or a file which is consuming larger disk space sing i want to find out the file and want to compress it please help me out any help would be appreciated (6 Replies)
Discussion started by: lokeshpashine
6 Replies

9. UNIX for Dummies Questions & Answers

How to view a big file(143M big)

1 . Thanks everyone who read the post first. 2 . I have a log file which size is 143M , I can not use vi open it .I can not use xedit open it too. How to view it ? If I want to view 200-300 ,how can I implement it 3 . Thanks (3 Replies)
Discussion started by: chenhao_no1
3 Replies

10. UNIX for Dummies Questions & Answers

Hosting Service Eating Space

Dear Group, I am not much used to UNIX. The company I am hosting wiht refuses to help me with this trouble, but as near as I can see, it is NOT my trouble. I have had this service for over a year. I just renewed for another year and all of a sudden the disk quota has been disappearing. I... (3 Replies)
Discussion started by: cindy
3 Replies
Login or Register to Ask a Question