File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Recycle bin in linux

 
Gopu Akraju
Ranch Hand
Posts: 242
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1294
IntelliJ IDE Java Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 17616
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 .
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic