Recovering a Deleted Open File

Jamon Camisso jamon.camisso-H217xnMUJC0sA/PxXw9srA at public.gmane.org
Wed Jul 7 16:05:20 UTC 2010


On 07/07/2010 08:57 AM, Mike Kallies wrote:
> Hello Everyone,
> 
> I was gzipping a mammoth tarball and didn't realize that the gzip
> process had not yet completed before I deleted the original.
> 
> I'm concerned that the gzip will run out of space, the process will drop
> its file handle and the file will be freed.  So I did a ctrl-z to stop
> the process, and checked the open files.  It's still there, all is good.
> 
> sooo... how do I give a handle back to /home/mike/Win2k3-d.tar ?
> 
> gzip Win2k3-d.tar
> 
> ^Z
> [1]+  Stopped                 gzip Win2k3-d.tar

Since it is stopped, fg 1 will resume.

If you have multiple stopped jobs, use "jobs" to list them.

Then use fg # to resume, (where # is the number of the job you want in []

Try it out: start top, ctrl+z it, start another, then run "jobs" to show
all three that you have suspended. Use fg 2 to resume the first
suspended top, 3 the second, and finally 1 your gzip.

Jamon
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list