?
Solved

undo delete files in soloris

Posted on 2003-03-02
7
Medium Priority
?
2,146 Views
Last Modified: 2013-12-27
how to undo the deleted file in solaris, the command i use is mv


thanks


0
Comment
Question by:usermic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 21

Expert Comment

by:tfewster
ID: 8051400
mv doesn't delete files, it renames them and/or moves them to a different directory. You should be able to reverse the "mv" command and move them back. (Change `mv source target` to `mv target source`)

If the `target` file already existed, it will have been overwritten by the `source` file and you'll need to restore from backup :-(

If you are still having trouble, please post the exact command you used.
0
 

Author Comment

by:usermic
ID: 8051530
typing error: my command is rm
0
 
LVL 21

Accepted Solution

by:
tfewster earned 80 total points
ID: 8051666
Generally, there's no way to `undo` an rm; If you don't have a backup, there are tools that will help you recover the blocks of data (as long as they haven't been overwritten) but it's a difficult and uncertain process. If it's valuable data, you could get a specialist data recovery company to do it.

See the following thread for further details:
http://www.experts-exchange.com/Operating_Systems/Unix/Q_20267248.html
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 

Expert Comment

by:duy
ID: 8067765
unlike windows, you cannot "undo" a command once initiated.
Make certain that you know what you are deleting before doing rm. Good luck!
0
 

Expert Comment

by:jhundpogi
ID: 8164688
one good advice always create an alias with your rm with rm -i..; or run a tar/gz before removing anything..

Well mv is also dangerous if used it to move files to /dev/null
0
 
LVL 18

Expert Comment

by:liddler
ID: 10475047
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by tfewster

Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

liddler
EE Cleanup Volunteer
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month11 days, 20 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question