Solved

Is there a recycle bin in Linux?

Posted on 2011-03-09
5
487 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

828 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