Solved

Is there a recycle bin in Linux?

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
good comptia a+ teacher? 4 75
Need to roll back kernel via script 4 42
How to clone solaris 10 machine 33 74
Squid Authentication 7 32
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
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.

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now