Sponsored Content
Full Discussion: UNDELETE a file
Top Forums UNIX for Advanced & Expert Users UNDELETE a file Post 302230997 by snowline84 on Monday 1st of September 2008 07:24:09 AM
Old 09-01-2008
UNDELETE a file

Hi,

In tcsh, I mistakenly deleted some files under a dir with rm *
Is there any way by which I can recover those files (without restoring to an earlier backup point) ?
I mean any command like undelete or anything similar
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

undelete

Hi All, I just given $rm abc.pc, I don't have backup also. is there any way to recover? thanks in advance krishna (3 Replies)
Discussion started by: krishna
3 Replies

2. Filesystems, Disks and Memory

Undelete files

Right, a mate of mine screwed up today and deleted the entire contents of a directory and he really needs to get the files back. He's using Red Hat Enterprise Edition 4. The files were deleted using rm *. He can't remember if the hard drive was formatted using ext2 or ext3. Anybody have any idea... (0 Replies)
Discussion started by: Bacchus
0 Replies

3. UNIX for Dummies Questions & Answers

Undelete files in Unix

Hi Is there any way to restore files accidentally deleted in Unix (other than rm -i) (10 Replies)
Discussion started by: misenkiser
10 Replies

4. UNIX for Advanced & Expert Users

How to undelete

Hi Is there a way by which I can recover the last deleted file file from a folder. OR I had a file in a path .(i didnt notice the size at that time ) I tried ftp that file to my windows but got file of zero size. I want to check whether the file was already empty when I tried ftping it... (1 Reply)
Discussion started by: pratim09
1 Replies

5. SCO

Versioning through undelete

Hi , I am using SCO openserver realease 3.2 and tried to test versioning on a directory with undelete -s . The command executes well but it is not creating any versions of the files in it. I have also setted versioning options via filesystem and then remounted it but of ... (0 Replies)
Discussion started by: dextergenious
0 Replies

6. Shell Programming and Scripting

Match list of strings in File A and compare with File B, C and write to a output file in CSV format

Hi Friends, I'm a great fan of this forum... it has helped me tone my skills in shell scripting. I have a challenge here, which I'm sure you guys would help me in achieving... File A has a list of job ids and I need to compare this with the File B (*.log) and File C (extend *.log) and copy... (6 Replies)
Discussion started by: asnandhakumar
6 Replies

7. Shell Programming and Scripting

Compare 2 text file with 1 column in each file and write mismatch data to 3rd file

Hi, I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file. File1 - file2 = file3 wc -l file1.txt 58112 wc -l file2.txt 55260 head -5 file1.txt 101214200123 101214700300 101250030067 101214100500... (10 Replies)
Discussion started by: Divya Nochiyil
10 Replies

8. Solaris

Undelete, backup inodes

is there a way to backup all inodes? (could that help with undeleting files?) (9 Replies)
Discussion started by: orange47
9 Replies

9. Shell Programming and Scripting

Shell script (sh file) logic to compare contents of one file with another file and output to file

Shell script logic Hi I have 2 input files like with file 1 content as (file1) "BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt File 2 contents as fle(2) "BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt I want to get... (22 Replies)
Discussion started by: pottic
22 Replies
CLOSE(2)						      BSD System Calls Manual							  CLOSE(2)

NAME
close -- delete a descriptor LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <unistd.h> int close(int fd); DESCRIPTION
The close() system call deletes a descriptor from the per-process object reference table. If this is the last reference to the underlying object, the object will be deactivated. For example, on the last close of a file the current seek pointer associated with the file is lost; on the last close of a socket(2) associated naming information and queued data are discarded; on the last close of a file holding an advisory lock the lock is released (see further flock(2)). However, the semantics of System V and IEEE Std 1003.1-1988 (``POSIX.1'') dictate that all fcntl(2) advisory record locks associated with a file for a given process are removed when any file descriptor for that file is closed by that process. When a process exits, all associated file descriptors are freed, but since there is a limit on active descriptors per processes, the close() system call is useful when a large quantity of file descriptors are being handled. When a process forks (see fork(2)), all descriptors for the new child process reference the same objects as they did in the parent before the fork. If a new process is then to be run using execve(2), the process would normally inherit these descriptors. Most of the descriptors can be rearranged with dup2(2) or deleted with close() before the execve(2) is attempted, but if some of these descriptors will still be needed if the execve fails, it is necessary to arrange for them to be closed if the execve succeeds. For this reason, the call ``fcntl(d, F_SETFD, FD_CLOEXEC)'' is provided, which arranges that a descriptor will be closed after a successful execve; the call ``fcntl(d, F_SETFD, 0)'' restores the default, which is to not close the descriptor. RETURN VALUES
The close() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error. ERRORS
The close() system call will fail if: [EBADF] The fd argument is not an active descriptor. [EINTR] An interrupt was received. [ENOSPC] The underlying object did not fit, cached data was lost. [ECONNRESET] The underlying object was a stream socket that was shut down by the peer before all pending data was delivered. In case of any error except EBADF, the supplied file descriptor is deallocated and therefore is no longer valid. SEE ALSO
accept(2), closefrom(2), execve(2), fcntl(2), flock(2), open(2), pipe(2), socket(2), socketpair(2) STANDARDS
The close() system call is expected to conform to ISO/IEC 9945-1:1990 (``POSIX.1''). HISTORY
The close() function appeared in Version 7 AT&T UNIX. BSD
September 11, 2013 BSD
All times are GMT -4. The time now is 03:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy