Actually there can be an impact on disk space. If you have regular files in /proc/pid/fd with link count 0, then this process has a file open, which is not visible in the file system, but consumes disk space. The disk space used will be freed once the process ends or closes the file.
Example:
This file (named dummyfile before it was deleted) still uses 12MB on disk until the sleep command running in the background ends or is killed.
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)
Hi,
I need to write a shell script that should lists only the files that starts with alphabet from the /proc dir and then I have to cat those files and redirect to a file.
But my below script is not working. It is reading the first file properly but not the subsequent files. Please throw a... (2 Replies)
Hi All,
Please explain me the concept of link counts when you try to view the contents of any file or directory using ls command.
-sh-3.00$ ls -lrt
total 194
drwxr-xr-x 2 root root 4096 Aug 12 2004 srv
drwxr-xr-x 2 root root 4096 Aug 12 2004 mnt
drwxr-xr-x 2 root root ... (1 Reply)
Hi,
I am trying to calculate the CPU Usage by getting the difference between the idle time reported by /proc/stat at 2 different intervals. Now the 4th entry in the first line of /proc/stat will give me the 'idle time'. But I also came across /proc/uptime that gives me 2 entries : 1st one as the... (0 Replies)
whenever i add a package i almost always get a message about how some files are already installed and most of the time they are attribute only changes with some marked indicating conflicts.
can someone explain the impact of this? is this something i dont really need to worry about? what... (6 Replies)
Currently my data is organised in a volume which has a cache directory (where all the files are first created or transferred). After that there are suitable directories on the volume which in their subdirs, contain files hardlinked to files in the cache. This is done so that the same inode... (1 Reply)
I run a find command to search from root directory.
find / -inum 344334
The output gives the below warning:
find: WARNING: Hard link count is wrong for /proc/1. This may be a bug in your filesystem driver. Automatically turning on find's -noleaf option. Earlier results may have failed to... (2 Replies)
Hi Guys!!!
->I am using AIX 6.1. One of the file system full which is /var filesystem.
->/var total size is 5.00 GB.
->And inside the /var file system spool/mail folde is taking around 2.9 GB.
->There 3 big size of file as shown below, which shows that these files are taking more size.... (4 Replies)
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)
hi All, Any one answer my requirement.
I have source location
src_dir="/home/oracle/arun/IRMS-CM"
My Target location
dest_dir="/home/oracle/arun/LiveLink/IRMS-CM/$dc/$pc/$ct"
my source text files check with below example.text file content
$fn "\t" $dc "\t" $pc "\t" ... (3 Replies)
Discussion started by: sravanreddy
3 Replies
LEARN ABOUT HPUX
close
close(2) System Calls Manual close(2)NAME
close - close a file descriptor
SYNOPSIS DESCRIPTION
closes the file descriptor indicated by fildes. fildes is a file descriptor obtained from a or system call. All associated file segments
which have been locked by this process with the function are released (i.e., unlocked).
RETURN VALUE
Upon successful completion, returns a value of 0; otherwise, it returns -1 and sets to indicate the error.
ERRORS
fails if the any of following conditions are encountered:
[EBADF] fildes is not a valid open file descriptor.
[EINTR] An attempt to close a slow device or connection or file with pending aio requests was interrupted by a signal. The
file descriptor still points to an open device or connection or file.
[ENOSPC] Not enough space on the file system. This error can occur when closing a file on an NFS file system. [When a system
call is executed on a local file system and if a new buffer needs to be allocated to hold the data, the buffer is
mapped onto the disk at that time. A full disk is detected at this time and returns an error. When the system call
is executed on an NFS file system, the new buffer is allocated without communicating with the NFS server to see if
there is space for the buffer (to improve NFS performance). It is only when the buffer is written to the server (at
file close or the buffer is full) that the disk-full condition is detected.]
SEE ALSO creat(2), dup(2), exec(2), fcntl(2), lockf(2), open(2), pipe(2), thread_safety(5).
STANDARDS CONFORMANCE close(2)