Meaningless Drivel is fun!*
The moose likes Linux / UNIX and the fly likes Recycle bin in linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Recycle bin in linux" Watch "Recycle bin in linux" New topic
Author

Recycle bin in linux

Gopu Akraju
Ranch Hand

Joined: Jan 13, 2008
Posts: 242
Hi,
I am a beginner and have used only Windows. Is there any way to retrive the deleted files in Linux as we have in windows recycle bin? What is the mechanism in linux? Thanks.
Marco Ehrentreich
best scout
Bartender

Joined: Mar 07, 2007
Posts: 1280

Hi Gopu,

generally this is more difficult and different than under Windows OSes. Linux offers a lot more file systems than Windows does which may be a main reason that there's mostly no unified concept of a "recycle bin" on the file system layer. The only undelete tool I know is for ext2 file systems. I guess there are more tools but probably they are specific to one file system.

The other way is how the Windows recycle bin probably works, too. Graphical desktop environments like Gnome or KDE have a concept of a recycle bin where you can undelete files etc. But for this to work you also have to use the recycle bin to delete files or directories. If you delete them directly without the recycle bin knowing it they are gone forever (without special tools).

I hope this makes it a little clearer

Marco
[ May 28, 2008: Message edited by: Marco Ehrentreich ]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16020
    
  20

It's actually a lot like Windows. If you delete a file from CMD or COMMAND.EXE or a Windows application, it doesn't go into a recycle bin either. Likewise it probably won't go into a recycle bin if it's on a network drive.

The concept of a recycle bin is something that is generally done at the GUI desktop level, so if you delete a file any other way it normally won't get saved. That's just tradition, however. There's no reason why a Linux filesystem couldn't be made to support a bin at the OS level. In fact, with the Userspace file system, you could probably easily implement a facade for the ext2/3 or other filesystem(s) of your choice that converted deletion operations into "move to recycle bin directory" operations.

The really fun thing about Linux, however, is that unlike Windows, there's more than one Desktop manager to choose from and no real standard on where they should put their recycle bins (if any). It's usually a hidden directory in your desktop or home directory, however .


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Recycle bin in linux