restoring deleted files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers restoring deleted files
# 1  
Old 03-10-2005
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 SCO_SV 3.2 2 i386

Anyone's help or thoughts would be much appreciated.

Thank Mike
# 2  
Old 03-10-2005
there will be no way to get these files back... there is no rubbish bin in UNIX

gP
# 3  
Old 03-10-2005
There is probably a lession to be learnt here.... Proper permissions set on the /usr directory and the files contained within it would stop a "user" from being able to delete the files within it.

If permissions were set correctly, and seeing as the "user" didn't specify a recursive delete, then the only output you'd get would be something like
Code:
$ rm -f /usr/*
rm: /usr/X11R6: is a directory
rm: /usr/bin: is a directory
rm: /usr/games: is a directory
rm: /usr/include: is a directory
rm: /usr/lib: is a directory
rm: /usr/local: is a directory
rm: /usr/man: Permission denied
rm: /usr/sbin: is a directory
rm: /usr/share: is a directory
rm: /usr/src: Permission denied

If the user had su'd to root, however, it'd be a different story, although rm still wouldn't recurse. If this is the case, I'd say it's time to review your policy on allowing users root access.

Depending on what's been deleted, you might have limited success pulling the files from your backup tapes (you do have backups, right?)

Cheers
ZB
# 4  
Old 03-10-2005
ZB has a good point. I don't have access to a SCO box, but /usr on other systems seems to contain symlinks and subdirectories, no files per se. Any symlinks would've been clobbered, but these should be fairly easy to restore from backups or copy from a similiar system.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

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. (5 Replies)
Discussion started by: galford
5 Replies

2. Shell Programming and Scripting

Restoring files from backup based on ctime

Hello, I need to restore some yesterday emails from backup within a 5 hours timeframe this is a openvz container, backup is made by rsync files to another partition in the same server I have tried to do this #!/bin/sh cd /vz/backup/414/home/smartftp/mail/domain1.com/ for dir in new... (6 Replies)
Discussion started by: cuantica
6 Replies

3. UNIX for Dummies Questions & Answers

[SOLVED] Restoring differential backup files

I'm using a script (automysqlbackup) to dump mysql db's to .sql file followed by taking one full backup of the .sql file and the differential backups of the newer sql file every day using the tool diff. Now the backup destination folder contains files like, I would like to how do i restore... (3 Replies)
Discussion started by: csengineer
3 Replies

4. Linux

Need help with deleted files

Hello. I am having a problem and I was wondering if I could get some help from here. I changed into a directory with the cd command and I wanted to delete a folder and all of its subdirectories, so I went ahead and did a rm --recursive * in my current directory to realize that I was in the wrong... (3 Replies)
Discussion started by: jonnydadesigner
3 Replies

5. UNIX for Advanced & Expert Users

Restoring files from CVS !

I have accidently removed a file using the command rm -r "file.txt" (I have removed it locally !) I need to restore the file.txt to my existing CVS version.How can I do it ? Please help. Thank you. :wall: (5 Replies)
Discussion started by: gameboy87
5 Replies

6. UNIX for Dummies Questions & Answers

Restoring a single file from a group of files using tar

Hello I take a backup using the following command on Solaris 9 tar cvf /dev/rmt/0n data the data volume contains a number of files say a, b, c , d ... etc Now I want to restore only one file (eg b) from the data volume. When I issue the command tar xvf /dev/rmt/0n data/b... (1 Reply)
Discussion started by: rahmantanko
1 Replies

7. UNIX for Advanced & Expert Users

deleted all files - rm *

Hi All, I am using Fedora Core and Windows Xp. I deleted all the files from root directory. When i am trying to restart the computer it showing some grub > prompt. What i will do ? I have lots of data in XP OS. Please help me i used # rm * (8 Replies)
Discussion started by: pritish.sas
8 Replies

8. 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

9. Solaris

Problem restoring files from remote tape drive

Server 1 - Sun Solaris 5.8 sparc SUNW,Sun-Fire-480R with attached DLT tape drive /dev/rmt/0n Server 2 - Old DG-UX box which has restore command on it compatible with the files on the backyup tape - backed up with dump2 Server 3 - Sun solaris 5.9 sparc SUNW,Sun-Fire-V490 with lots of free space... (4 Replies)
Discussion started by: lindab
4 Replies

10. UNIX for Dummies Questions & Answers

Restoring tape files...

Hi all, I have kinda inherited this problem, but was wondering if anyone else had any ideas. Currently all our backup rentention periods are set to 2 weeks, so that we can cycle through tapes (save money etc...). Anyhow the guys next door in IT, decided one day long long ago, that it would... (0 Replies)
Discussion started by: B14speedfreak
0 Replies
Login or Register to Ask a Question