Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Restoring deleted file with rm -rf Post 302970774 by galford on Monday 11th of April 2016 08:21:24 PM
Old 04-11-2016
Restoring deleted file with rm -rf

Is there a way I could recover a deleted text file with "rm -rf" command.

Running CentOS 6.5.

Thank you.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Restoring a file from Tape

help please i have "inherited" a Sco Server (the administrator departed in a hurry...yes we are chasing him..) and haven't used Unix for 8 years. i have a file that i need to retrieve from a tape. i have been able to find the file on tape using the cpio -ivt command. however... the problem I... (3 Replies)
Discussion started by: mfischer
3 Replies

2. UNIX for Dummies Questions & Answers

Restoring a single file...???

Can anyone please help...? Managed to do a ufsdump of files to tape. Having trouble using ufsrestore to pull a single file back by filename?? I have dumped a single file to tape also because looking through the other threads, I noticed that you have to tell it to skip files before you get to... (1 Reply)
Discussion started by: Jonathan
1 Replies

3. UNIX for Dummies Questions & Answers

restoring deleted files

I had a user run, by accident, the following line command on our UNIX server: rm -f /usr/* This apparently deleted some needed files on your system. Having very limited knowledge in UNIX, I thought I would ask the group if anyone knows how I can recover these file? The version of UNIX is... (3 Replies)
Discussion started by: mikem
3 Replies

4. Solaris

Restoring TAR'd file to different location

Is it possible to restore a TAR'ed file off of a tape to a location other than the original location? If so, how? (The MAN pages give examples of how to restore only to the originating location.) Thanks!! (1 Reply)
Discussion started by: FredSmith
1 Replies

5. UNIX for Dummies Questions & Answers

Blocksize problem restoring file from tape

I was recently given the responsibility of the unix box at our work. Without much training, I now have to go back and restore a file from tape. I'm having some trouble with it. I'm getting an error with the blocksize. The part of the script that does the tar looks like this: tar cvfX... (11 Replies)
Discussion started by: citrowske
11 Replies

6. Shell Programming and Scripting

Restoring a file

I'm new to Unix and have just wrote a little program to move files to a recycle bin (a Directory i created) and restore them. The problem is that i need to keep track of all the full filenames so that i can restore them to the right place. I did this by creating a file called delreg and putting the... (4 Replies)
Discussion started by: zoolz
4 Replies

7. UNIX for Dummies Questions & Answers

Restoring back a deleted file in unix.

Hi, Can any one tell me how to restore back the deleted file in unix? I know the file name. If i know the inode number of the file does help more to restore back the file? (1 Reply)
Discussion started by: siba.s.nayak
1 Replies

8. Shell Programming and Scripting

restoring file to its default location...

Hello everyone, I am new to unix shell. I have a file called Path.txt....and i have data in that as 1 abhi 2 avi 3 ash so on..... 1 ,2 ,3 is the... (2 Replies)
Discussion started by: AbhijitIT
2 Replies

9. Shell Programming and Scripting

Restoring a file to its original location

Hello everyone, I am attempting to make a recycling bin type application in shell script (tcsh). I have the whole part of the application done where someone can recycle files from one location to the recycling bin (the lower half of the program), this is not a problem. However I wanted to make... (7 Replies)
Discussion started by: tastybrownies
7 Replies

10. UNIX for Advanced & Expert Users

CentOS7 restoring file capabilities

Quite an obscure question I think. We have a rebuild process for remote sites that allows us to PXE rebuild a till (actually a PC with a touch screen and various fancy bits) running CentOS. The current CentOS5 tills work just fine with a tar image restore and some personalisation. Sadly,... (4 Replies)
Discussion started by: rbatte1
4 Replies
UNDELETE(2)						      BSD System Calls Manual						       UNDELETE(2)

NAME
undelete -- attempt to recover a deleted file LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <unistd.h> int undelete(const char *path); DESCRIPTION
The undelete() system call attempts to recover the deleted file named by path. Currently, this works only when the named object is a white- out in a union file system. The system call removes the whiteout causing any objects in a lower layer of the union stack to become visible once more. Eventually, the undelete() functionality may be expanded to other file systems able to recover deleted files such as the log-structured file system. RETURN VALUES
The undelete() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indi- cate the error. ERRORS
The undelete() succeeds unless: [ENOTDIR] A component of the path prefix is not a directory. [ENAMETOOLONG] A component of a pathname exceeded 255 characters, or an entire path name exceeded 1023 characters. [EEXIST] The path does not reference a whiteout. [ENOENT] The named whiteout does not exist. [EACCES] Search permission is denied for a component of the path prefix. [EACCES] Write permission is denied on the directory containing the name to be undeleted. [ELOOP] Too many symbolic links were encountered in translating the pathname. [EPERM] The directory containing the name is marked sticky, and the containing directory is not owned by the effective user ID. [EINVAL] The last component of the path is '..'. [EIO] An I/O error occurred while updating the directory entry. [EROFS] The name resides on a read-only file system. [EFAULT] The path argument points outside the process's allocated address space. SEE ALSO
unlink(2), mount_unionfs(8) HISTORY
The undelete() system call first appeared in 4.4BSD-Lite. BSD
January 22, 2006 BSD
All times are GMT -4. The time now is 05:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy