diff command filling /var filesystem space


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users diff command filling /var filesystem space
# 1  
Old 01-18-2009
diff command filling /var filesystem space

Hi,

I am using diff command to check difference between two files.Both files are very big and when i execute this command /var temp space is filled up almost 99%.

Can any one please tell me is there any way i can specify directory name which has more space so that diff can use that dir for its temp storage.

Thanks
# 2  
Old 01-18-2009
There may be other methods. A quick answer would be "man bdiff" but it is not usual to run diff of bdiff on very large files.

Please state:
Precise version of Unix/Linux.
Approximate size of each data file.
Amount of free disc space in directories root /tmp /usr/tmp and /var/tmp . Are any of these directories links or mountpoints already? Your problem only makes sense if /usr/tmp is linked to /var/tmp in some way or maybe root /usr and /var are on the same filesystem

Are the files sorted text files ? If not, are they in any particular order?

What you want to know from the "diff" command?
Do you just want to just know if the files are different?
Do you want to count the differences?
Do you want to see every difference?

Last edited by methyl; 01-18-2009 at 05:35 PM.. Reason: typo
# 3  
Old 01-20-2009
opengroup.org the SUSv3 (POSIX) "keepers" -- suggests very strongly that TMPDIR be observed by all implementations of the core utilities. This allows users to specify temporary disk space. It is not a requirment, so it may not work for you.

It works for the implementations of diff I can get to right now: RHEL 4, HPUX 11.23
Code:
TMPDIR=/tmp  # or wherever there is free space and the directory is set up correctly.

It is worth a try at least.

And Methyl has it - using diff/bdiff on gigantic files is not a great idea. There must be a better way.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[bash] script is filling up my /var/log

I am trying to create a script that checks if my VPN connection is up and running... Everything seems to work as except but for some reason, the script fills up my /var/log/auth.log with the below information Dec 13 01:07:44 debian sudo: soichiro : TTY=pts/0 ; PWD=/home/soichiro/Desktop ;... (5 Replies)
Discussion started by: soichiro
5 Replies

2. UNIX for Dummies Questions & Answers

Filling tab space with dots or dashes

Hey Guys & Gals ! My script is creating a numbered list and I would like to have the numers and results spaced apart by a tab. Now to make sure it is clear which number corresonds with which outcome, I would like to have the tab space filled with dashes. Anyone able to tell me if this... (6 Replies)
Discussion started by: TAPE
6 Replies

3. Emergency UNIX and Linux Support

Error filling /var/adm/messages

I have Solaris-11 non-global zone running under Solaris-11 global zone. Every few minutes, this message is getting in /var/adm/message of non-global zone Aug 31 08:31:53 zonnjc002dbp01 statd: statd: cannot talk to statd at NAS1, RPC: Timed out(5) NAS1 is already mounted as NFS and working... (2 Replies)
Discussion started by: solaris_1977
2 Replies

4. Emergency UNIX and Linux Support

[Solved] /var is filling continuously

Hi All, I have Solaris-10 machine. Yesterday I patched it with Solaris-10 patch Cluster. Since then glance software is filling up /var/core continuously. In every few minutes, it will fill /var to 100%. Glance runs through /etc/init.d/mwa and I already stopped it, still core files are... (15 Replies)
Discussion started by: solaris_1977
15 Replies

5. Shell Programming and Scripting

Calculate total space, total used space and total free space in filesystem names matching keyword

Good afternoon! Im new at scripting and Im trying to write a script to calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies

6. UNIX for Dummies Questions & Answers

Root filesystem filling up!

Hi all. New to the forum and new to Unix admin... / filesystem filled up and I can't find where the large files are. Any help will be apppreciated: # df -k Filesystem kbytes used avail capacity Mounted on /dev/dsk/c1t0d0s0 8063580 7941745 41200 100% / /proc ... (4 Replies)
Discussion started by: jamie_collins
4 Replies

7. AIX

/var filesystem is full

Hi, Is there a way to clear the temp files from /var/tmp? Is root access required to delete the files? Thanks, Narayan (2 Replies)
Discussion started by: narayanv
2 Replies

8. Solaris

diff b/w /var/log/syslog and /var/adm/messages

hi sirs can u tell the difference between /var/log/syslogs and /var/adm/messages in my working place i am having two servers. in one servers messages file is empty and syslog file is going on increasing.. and in another servers message file is going on increasing but syslog file is... (2 Replies)
Discussion started by: tv.praveenkumar
2 Replies

9. Solaris

Filesystem filling up and no clue as to why!

df shows that the filesystem is filling up and the usage is 94%. However when I actually traverse to the directory I du shows only about 10% of the space occupied! Below is the output of df and du: >>>df -kh /cbmdata/00 470M 393M 29M 94% /cbmdata/00 >>>/cbmdata/00>... (3 Replies)
Discussion started by: zombiezparadize
3 Replies

10. UNIX for Advanced & Expert Users

Process responsible for filling up /var/tmp

Hi, Help ! - I have a process which I cannot find that is writing to /var/tmp every 10 minutes and filling up my partition, it is also filling up my wtmpx file. I have some software error correction for a faulty DIMM at the moment - is this likely to be causing this as well as over-loading my... (3 Replies)
Discussion started by: Mal
3 Replies
Login or Register to Ask a Question