Solved

how to emptry trash on command line from ubuntu 10.04

Posted on 2011-09-03
4
624 Views
Last Modified: 2012-05-12
hi,

how could i empty trash from the command line on ubuntu 10.04 ? thanks.
0
Comment
Question by:zizi21
  • 2
  • 2
4 Comments
 
LVL 37

Accepted Solution

by:
Gerwin Jansen earned 500 total points
ID: 36477699
These 2 commands will empty 'your' trash:
rm -rf ~/.local/share/Trash/files/*
rm -rf ~/.local/share/Trash/info/*

Open in new window

0
 

Author Comment

by:zizi21
ID: 36479153
Thanks a million
0
 

Author Comment

by:zizi21
ID: 36479198
But i cant find the trash on the local computer ?
0
 
LVL 37

Expert Comment

by:Gerwin Jansen
ID: 36479787
You mean you can't find the trash folder? You can display it like this:

ls -al ~/.local/share

Open in new window


If I have something in trash, the trash icon (right lower corner of desktop) is 'filled'. When deleting the contents through the script, the trash icon shows 'emptied'.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
LINUX, CPANEL & WHM 5 44
Remove a very long string from all files in Linux 6 85
Fixing Non-Standard characters in text 8 91
Remove a folder in Linux 9 90
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

911 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

26 Experts available now in Live!

Get 1:1 Help Now