Nullifying Zero Link Files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Nullifying Zero Link Files
# 1  
Old 11-22-2011
Nullifying Zero Link Files

how do i nullify zero link files under /proc
please help me
# 2  
Old 11-22-2011
/proc is a special folder. The files inside it don't really exist, they're listings provided by the kernel. There's nothing to nullify.
# 3  
Old 11-22-2011
actually these zero link files are eating up disk space. if I do
> /proc/<pid>/fd/17356
it says permission denied.

if i take an example from another post,
find /proc/*/fd -type f -links 0 -size +10000 -ls
97442 12683 -r--r--r-- 0 hergp rzadmin 12935547 Sep 29 09:56 /proc/20251/fd/0

this is taking up 12 MB of disk space, then how do i free this 12 MB?
# 4  
Old 11-22-2011
These files don't really exist in proc. /proc/ is a special folder provided by the kernel showing process statistics. /proc/fd/# lists files the process has open somewhere else. In Linux, these are symlinks that point to the real file. In whatever OS you have (which is something that'd be handy to know), it's shown as a read-only file.

You need to track down the real file.
# 5  
Old 11-22-2011
/proc uses NO DISK. Period. The files exists somewhere else on disk. The process with pid=17356 has the disk file open. The file does not reside in /proc. /proc is a kernel representation of a file. The data for the file resides on a disk.

You can use lsof or fuser to find the actual name of the file.

One other note - if a process opens a file, then deletes the file but leaves the file open, the directory entry (how you find the actual file) is gone. You cannot see it. And as long as the process runs the disk space is consumed by the file. Once the last file descriptor that references the file is closed, the OS then deletes the now nameless file. This is what creates a zero hardlink file.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Zero link count files in proc

Hi Experts, I had encountered an issue where the zero link process was holding too much amount of data on a Solaris server. I was able to terminate the process after which the space of the file system was released. 40G /proc/8567/fd/2 Can you please let me know if there are any... (11 Replies)
Discussion started by: dhanu1985
11 Replies

2. Solaris

Nullifying Zero Link Files

How do I nullify a zero link file. Please help me (0 Replies)
Discussion started by: bluenavi
0 Replies

3. Shell Programming and Scripting

Nullifying a log file

Hi, I have a Weblogic server running in Solaris box which is writing an out file 'server.out' but this file is growing so fast 1GB per hour . to nullify this file and keep the process update I have created a shell script. 1 ) cp /dev/null server.out 2 ) cat /dev/null > server.out 3 )... (2 Replies)
Discussion started by: Joseph Antoine
2 Replies

4. Shell Programming and Scripting

moving files and creating a link to it

Hi All, I am in a tricky situation where I have to move my files to a different mount point and create a link in place of the file which will point to the moved location. to explain you in details:- say I have two mount points /dir/mount1/ /dir/mount2/ I have my application... (5 Replies)
Discussion started by: rpraharaj84
5 Replies

5. Shell Programming and Scripting

How to find link files

How to find the link files. i have main file, now i want to find all the files linked to it. (4 Replies)
Discussion started by: aju_kup
4 Replies

6. UNIX for Advanced & Expert Users

how to remove the files along with its link files

How to remove the files along with its link files either hardlink or softlink? (1 Reply)
Discussion started by: Ramesh_srk
1 Replies

7. Shell Programming and Scripting

link files together

if I have 1000 files, named file1, file2, ... ,file1000. for each one, I want to append a line, for example "this is the end of file#". then, I want to link them all together. how can I do that by using a simple script? (1 Reply)
Discussion started by: fredao
1 Replies

8. UNIX for Dummies Questions & Answers

Link files....

How do you identify the type of a link in the output of the ls -l command? (1 Reply)
Discussion started by: Tom Bombadil
1 Replies

9. UNIX for Dummies Questions & Answers

Permissions on link files

Does any one now if you can change permissions on a linked file with out completely removing it and then relinking it? (2 Replies)
Discussion started by: moviestud80
2 Replies

10. Shell Programming and Scripting

Link files in unix

Can anyone say some ideas about using/creating link files (for ex., lrwxrwxrwx 1 bin bin 7 Jan 10 2001 bin -> usr/bin) in a shell script. (2 Replies)
Discussion started by: yuvasyntel
2 Replies
Login or Register to Ask a Question