LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-23-2010, 01:18 AM   #1
somupl86
LQ Newbie
 
Registered: Nov 2010
Posts: 13

Rep: Reputation: 0
Can we retrive the file which got removed from file system using rm command


Hi,

As in windows all the delted items will got to RecycleBin is there any such thing in linux.

(Or)

Can we retrive the file which got removed from file system(using rm command)


Thanks,
Soma Sekhar
 
Old 11-23-2010, 02:51 AM   #2
NitinkumarYemul
LQ Newbie
 
Registered: Oct 2007
Location: India
Distribution: Fedora 13
Posts: 11

Rep: Reputation: 1
If you are using a GUI desktop then by default file deletion moves the file to trash (trash is similar to RecycleBin in Windows).

In command prompt 'rm' command deletes the file from the disk. It does not move the file to trash.

You may have to write a small script to move the files to trash. And use that script instead of rm.
 
Old 11-23-2010, 03:20 AM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by somupl86 View Post
Hi,

As in windows all the delted items will got to RecycleBin is there any such thing in linux.

(Or)

Can we retrive the file which got removed from file system(using rm command)


Thanks,
Soma Sekhar
Generally speaking: no.

Long answer: if the file is really important you should turn off your pc NOW, by cutting the electric source. Without even bothering to shut it down properly, because services can write on the disk while shutting down.

Then boot off a livecd which has the photorec tool, and try to find the file using it.

There are other recovery methods that depends on particular fs features. But as said that depends on what fs are you using.
 
Old 11-23-2010, 03:48 AM   #4
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Quote:
Originally Posted by somupl86 View Post
Can we retrive the file which got removed from file system(using rm command)
No, but you can ask rm to give you a reminder...
Code:
anisha@linux-uitj:~> touch deleteMe.c
anisha@linux-uitj:~> rm -i deleteMe.c
rm: remove regular empty file `deleteMe.c'? y
anisha@linux-uitj:~>
 
Old 11-23-2010, 05:23 AM   #5
somupl86
LQ Newbie
 
Registered: Nov 2010
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks for all of them

Thanks for all of your valuable reponses and truths.

Finally i got to conclusion, retriving a file is not that easy that deletion is(in Linux)!! :-)


Thanks,
Soma
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to change file attributes from read only so the file can be removed. Tomarock Linux - Software 7 08-11-2009 05:42 AM
How do you restore a file that has been removed via the rm command? EnderX Linux - Newbie 4 02-08-2007 10:48 AM
Unable to send or retrive file using vsftpd yspl Linux - Networking 4 09-29-2005 10:10 AM
Files removed from file system during Fedora Core Upgrade gryphonavocatio Linux - General 5 09-21-2005 12:27 PM
How to Retrive /etc(sys file) !! hitesh_linux Linux - General 4 02-08-2003 07:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration