Solved

Is there a recycle bin in Linux?

Posted on 2011-03-09
5
482 Views
Last Modified: 2016-02-10
I was having some "space issues" on my server so I deleted a bunch of stuff, and it didn't seem to free up my available space?

I'm running FreeBSD.
0
Comment
Question by:hrolsons
5 Comments
 
LVL 33

Expert Comment

by:jppinto
ID: 35085003
0
 
LVL 8

Expert Comment

by:ragnarok89
ID: 35085083
This is for the gnome trash, I'm not sure where KDEs trash is located... But put this somewhere in your users ~/.bashrc:

Code:

alias rm='mv --target-directory ~/.Trash'

Now, if rm a file or directory as that user, it should go to trash instead of permanent deletion.

--- Beware that you have to re-login first for this to take effect! ---
0
 
LVL 35

Expert Comment

by:torimar
ID: 35085157
Recycle bins will only be found in GUI enhanced Linux, and they only apply to files you deleted using the graphical interface in some way.
They do not apply to deletions via the 'rm' command on the CLI.

If you run a server, chances are it is CLI only, so you would have to check elsewhere for the space that is not freed.
Mabe you deleted links to files, not the files themselves?
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35093862
Where do you have "space issues", and what did you delete?

Please keep in mind that "available space" is a filesystem property, so deleting files in one FS will only free up space in that FS and nowhere else.

Check with "df" for filesystems and space parameters!

Further, deleting a file which is held open by some process will not yield free space until the process holding the concerned file handle ends!

wmp
 
0
 
LVL 12

Accepted Solution

by:
mccracky earned 500 total points
ID: 35110620
Is the machine in question FreeBSD or Linux?

You can find the partitions usage with the command "df"
You can find file size through the use of the command "du"

I usually drill down to the larger files through the use of

du -ka --max-depth=2 | sort -n

which sorts the larger files/directories to the bottom of the list.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

777 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