Sponsored Content
Top Forums Programming deleting a file name by its handle Post 302096227 by Perderabo on Tuesday 14th of November 2006 12:42:30 PM
Old 11-14-2006
You can open the file and immediately remove it. Then simply use the file...because it is open by a process, the OS will not actually remove it until the final close. When you are finished with it, a simple close() will remove it from existence. And an exit() is good enough too, all opened files are closed on exit.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

NFS file handle

How can I kill mount connection(NFS , made by automount) if remote filesystem is down? I tried: fuser -ku /auto /auto: umount /auto nfs umount: ERROR: /auto is busy If I try cd /auto - I get - /auto: Stale remote file handle. I know that reboot will help but I cannot reboot this... (2 Replies)
Discussion started by: kazimir
2 Replies

2. UNIX for Advanced & Expert Users

Stale NFS file handle

Hi, I get an error saying "Stale NFS file handle" how can I solve this? Is it possible to do this with a umount/ mount command? (5 Replies)
Discussion started by: rein
5 Replies

3. UNIX and Linux Applications

Stale NFS file handle

There are a filesystem /GWD/appbase/projects/GRIDDB Under this filesystem there is a directory called backup. But When I am trying to access the backup directory ,it is showing me the following error: # cd /GWD/appbase/projects/GRIDDB # cd backup -bash: cd: backup: Stale NFS file handle ... (3 Replies)
Discussion started by: alphasahoo
3 Replies

4. Shell Programming and Scripting

How to handle multiple rows in a file

I have a FILE a.txt which has the following data 113901.94,113901.94,56950.97,56950.97,NOT MATCHING,NOT MATCHING 10693.04,10693.04,5346.52,5346.52,NOT MATCHING,NOT MATCHING 1901.94,1901.94,550.97,550.97,NOT MATCHING,NOT MATCHING 103.04,103.04,53.52,53.52,NOT MATCHING,NOT MATCHING #### This... (2 Replies)
Discussion started by: ksmbabu
2 Replies

5. Linux

NFS file handle question

Hello All, I have a small question regarding the NFS file handles. Suppose I have a NFS client who has requested for a particular file from the NFS server.Now lets assume that I am using a NFS v2 server. So I get the filehandle for that file and I can use it. Suppose later I upgrade the server to... (0 Replies)
Discussion started by: prathamesh
0 Replies

6. AIX

how to handle potential file contention

I need to change how a posting procedure currently works in order to improve load balancing but I am hitting a potential file contention problem that I was wondering if someone here could assist me with... In a directory called FilePool I would have a bunch of files that are constantly coming in... (3 Replies)
Discussion started by: philplasma
3 Replies

7. Shell Programming and Scripting

handle file by month

Hi, I want to write a shell script which handle an oracle alert log so that when it changes month, the script generates a new file with month in the filename. Thanks in advance. Leim (4 Replies)
Discussion started by: leim
4 Replies

8. Solaris

Before I delete any file in Unix, How can I check no open file handle is pointing to that file?

I know how to check if any file has a unix process using a file by looking at 'lsof <fullpath/filename>' command. I think using lsof is very expensive. Also to make it accurate we need to inlcude fullpath of the file. Is there another command that can tell if a file has a truely active... (12 Replies)
Discussion started by: kchinnam
12 Replies

9. UNIX for Advanced & Expert Users

How to decode nfs file handle in HP-UX?

Hi Experts, Any idea how to decode file handle in HP-UX? I am getting the following error continously in my HP-UX 11.31 box :mad: Apr 26 07:15:00 host62 su: + tty?? root-bb Apr 26 07:15:00 host62 su: + tty?? root-abcadm Apr 26 07:15:01 host62 vmunix: NFS write error on host peq9vs:... (1 Reply)
Discussion started by: vipinable
1 Replies

10. UNIX for Dummies Questions & Answers

Difference between handle to the thread HANDLE and thread identifier pthread_t

This question might be silly but its confusing me a bit: What is the difference between handle to the thread HANDLE and thread identifier pthread_t? ---------- Post updated at 01:52 PM ---------- Previous update was at 01:48 PM ---------- Sorry I saw details and HANDLE is in windows and... (0 Replies)
Discussion started by: rupeshkp728
0 Replies
close(n)						       Tcl Built-In Commands							  close(n)

__________________________________________________________________________________________________________________________________________________

NAME
close - Close an open channel. SYNOPSIS
close channelId _________________________________________________________________ DESCRIPTION
Closes the channel given by channelId. ChannelId must be an identifier for an open channel such as a Tcl standard channel (stdin, stdout, or stderr), the return value from an | invocation of open or socket, or the result of a channel creation command provided by a Tcl extension. All buffered output is flushed to the channel's output device, any buffered input is discarded, the underlying file or device is closed, and channelId becomes unavailable for use. If the channel is blocking, the command does not return until all output is flushed. If the channel is nonblocking and there is unflushed | output, the channel remains open and the command returns immediately; output will be flushed in the background and the channel will be | closed when all the flushing is complete. If channelId is a blocking channel for a command pipeline then close waits for the child processes to complete. If the channel is shared between interpreters, then close makes channelId unavailable in the invoking interpreter but has no other effect | until all of the sharing interpreters have closed the channel. When the last interpreter in which the channel is registered invokes close, | the cleanup actions described above occur. See the interp command for a description of channel sharing. | Channels are automatically closed when an interpreter is destroyed and when the process exits. Channels are switched to blocking mode, to | ensure that all output is correctly flushed before the process exits. The command returns an empty string, and may generate an error if an error occurs while flushing output. SEE ALSO
file(n), open(n), socket(n), eof(n), Tcl_StandardChannels(3) KEYWORDS
blocking, channel, close, nonblocking Tcl 7.5 close(n)
All times are GMT -4. The time now is 08:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy