Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I would like to empty my trash can. I am signed on as the only user of this Lubuntu 13.04 OS, but even though I use: "sudo rm -rfv ~/.Trash-1000", sudo shred -fuz, chmod -x filename and even sudo chown -R a 2067508202, the system never lets me delete. And when I navigate to this file and ls -la, the innermost jpg files are all in pink. Part of the log as below:
a@a-NC210-NC110:/media/a/AC/.Trash-1000/expunged/2067508202$ ls -la
總計 1276
drwx------ 1 a a 4096 12月 26 23:46 .
drwx------ 1 a a 4096 5月 19 22:57 ..
-rw------- 1 a a 97559 5月 21 2004 Sammi_2012 09 28.jpg
-rw------- 1 a a 82785 5月 21 2004 TeacherReviews-Vanessa0803.jpg
-rw------- 1 a a 71366 5月 21 2004 TeacherReviews-Vanessa0824.jpg
I was going to recommend that you rename the files using command completion or something. Or do
Quote:
ls -l > t.sh
and then edit the t.sh to make it a bash script where you take the file names from the ls output and rename them to be normally named files like 1.txt, 2.txt, and so forth. However, I can't figure out what's up here, instead of having bad file names, you have bad data in the result of your ls command.
1.) Recommend you restart if you haven't done so.
2.) If those files were from a removable drive which is no longer mounted, place it back in; if possible and try to delete them that way.
Pardon me for not translating this earlier: a@a-NC210-NC110:/media/a/AC/.Trash-1000/expunged/2067508202$ ls -la
Total 1276
drwx------ 1 a a 4096 12 26 23:46 .
drwx------ 1 a a 4096 5 19 22:57 ..
-rw------- 1 a a 97559 5 21 2004 Sammi_2012 09 28.jpg
-rw------- 1 a a 82785 5 21 2004 TeacherReviews-Vanessa0803.jpg
-rw------- 1 a a 71366 5 21 2004 TeacherReviews-Vanessa0824.jpg
-rw------- 1 a a 0 6月 10 00:07 ForeignTeacherTraineeClassSuggestionSheet_CA20120908.jpg
-rw------- 1 a a 99572 5月 21 2004 ForeignTeacherTraineeClassSuggestionSheet_CA20120926.jpg
-rw------- 1 a a 78082 5月 22 2004 ForeignTeacherTraineeClassSuggestionSheet_Ca20121031.jpg
-rw------- 1 a a 78082 5月 22 2004 ForeignTeacherTraineeClassSuggestionSheet_Can20120921.jpg
-rw------- 1 a a 89501 5月 22 2004 ForeignTeacherTraineeClassSuggestionSheet_Ei20120924.jpg
-rw------- 1 a a 95546 5月 22 2004 ForeignTeacherTraineeClassSuggestionSheet_Ei20121022.jpg
-rw------- 1 a a 79424 5月 23 2004 ForeignTeacherTraineeClassSuggestionSheet_Ma20121128.jpg
-rw------- 1 a a 69347 5月 23 2004 ForeignTeacherTraineeClassSuggestionSheet_MA20121214.jpg
-rw------- 1 a a 106965 5月 23 2004 ForeignTeacherTraineeClassSuggestionSheet_Q20120904.jpg
-rw------- 1 a a 72037 5月 23 2004 ForeignTeacherTraineeClassSuggestionSheet_Qu20121022.jpg
-rw------- 1 a a 96888 5月 23 2004 ForeignTeacherTraineeClassSuggestionSheet_Qu20121030.jpg
a@a-NC210-NC110:/media/a/AC/.Trash-1000/expunged/2067508202$ shred -fuz TeacherReviews-Vanessa0803.jpg
shred: TeacherReviews-Vanessa0803.jpg:Cannot remove: No such file or directory exists. a@a-NC210-NC110:/media/a/AC/.Trash-1000/expunged/2067508202$ shred -fuz ForeignTeacherTraineeClassSuggestionSheet_CA20120908.jpg
shred: ForeignTeacherTraineeClassSuggestionSheet_CA20120908.jpg:Cannot remove: No such file or directory exists. a@a-NC210-NC110:/media/a/AC/.Trash-1000/expunged/2067508202$ cd .. a@a-NC210-NC110:/media/a/AC/.Trash-1000/expunged$ sudo chown -R a 2067508202 a@a-NC210-NC110:/media/a/AC/.Trash-1000/expunged$ sudo rm -Rf /media/a/AC/.Trash-1000/expunged/2067508202
rm: Cannot remove: ‘/media/a/AC/.Trash-1000/expunged/2067508202’: Directory not empty a@a-NC210-NC110:/media/a/AC/.Trash-1000/expunged$
Hi, This has happend to me, but the trash was on a usb stick.
Eventually, I used the filemanager to restore the files, and then changed the files permissions, etc
sent them to the trash again and was able to empty the trash and delete the trash folder.
Maybe it will work for you.
Glenn
I am running gksudo nautilus via terminal. In both situations I right click, then for nautilus I select the "move to..." option, then thy to move it to the folder "a" of the removable hard disk. I encounter the error: "Error encountered when trying to move file to /media/a/AC/a directory." with a "No such file or directory exists" under "Display more .." option below.
Midnightcommander, dolphin and konqueror have this, "restore trash to original folder" (or something like that).
open the waste bin as a folder, right click file, select restore(dolphin)
pcmanfm & nautilus don't have the restore option when right clicking. On a previous installation of Lubuntu I tried installing and using dolphin, but then the whole system crashed and I had to conduct a new installation. I searched for Midnightcommander in synaptic package manager, but the search for such a program turned up nothing. Actually due to the previous crash I don't think installing KDE fm managers is a good idea. Thanks anyway!
Last edited by andrew.comly; 06-26-2013 at 06:19 PM.
Reason: typo
Unfortunately, midnight commander can only restore files that are on ext2 filesystem, I always like HDD that are compatible with windows, mac and linux in case of an emergency; thus this file is currently on NTFS.
Andrew
Last edited by andrew.comly; 08-02-2013 at 11:26 AM.
Reason: append
chmod will NOT work
ntfs dose NOT support file permissions
depending on how you are mounting this
fstab or a udev rule and NTFS-3g are responsible for mounting a ntfs drive
and simulating !!! the file permissions
chmod will NOT work
ntfs dose NOT support file permissions
depending on how you are mounting this
fstab or a udev rule and NTFS-3g are responsible for mounting a ntfs drive
and simulating !!! the file permissions
I finally had to fix something with my ntfs perms also. I went with
depending on how you are mounting this
fstab or a udev rule and NTFS-3g are responsible for mounting a ntfs drive
and simulating !!! the file permissions
so how is this drive mounted
John VV,
In case you mean what directory it's mounted under, it's under /media/a/AC, where “AC” is the name of the HDD. It mounts automatically as soon as I plug it into the USB port.
In case you mean directories: I don't have anything under /etc/fstab but I do have a /etc/fstab.d directory, however this is empty, even after I hit “Ctrl + h”. I looked at the wikipedia entry, and it said that some other versions of linux(like solarus) this might be under /etc/vfstab, but my directory doesn't have vfstab either. About udev: I do have this directory, and it has the following files: “applications.d(directory), sysctl.conf, ufw.conf, after.rules, after6.rules, before.rules, before6.rules”. The applications.d directory only has one file named cups (Common UNIX Printing System) in it. Finally about NTFS-3g, I don't have any directory like this in /etc.
Concerning man pages for commands, all 3 commands, as the man pages were output for all(see below)
a@a-NC210-NC110:~$ man udev
a@a-NC210-NC110:~$ man fstab
a@a-NC210-NC110:~$ man NTFS-3g
This shows that these commands are already installed on my system.
Concerning your suggestion to just delete “.Trash-1000” rather than emptying it”: some of the unremovable files are in the “.Trash-1000 folder”, but others are just in regular folders that when I ran a new rsync it just couldn't delete the files/folders on the ntfs drive like it naturally can on the internal ext4 formatted HDD. Concerning the “.Trash-1000” file, I do try to delete it, but I just get the error message “.Trash-1000: Unable to trash file: Invalid argument” when executing from pcmanfm. From terminal I'll execute “sudo rm -rfv .Trash-1000” then I get:
removed directory: ‘.Trash-1000/files’
removed ‘.Trash-1000/info/.Trash-1000.trashinfo’
removed ‘.Trash-1000/info/a.trashinfo’
removed ‘.Trash-1000/info/Sammi_2012 09 28.2.jpg.trashinfo’
removed ‘.Trash-1000/info/Sammi_2012 09 28.jpg.trashinfo’
removed directory: ‘.Trash-1000/info’
The above feedback from terminal is totally bogus since I'll go back into the .Trash-1000/expunged/2067508202 directory and those files are still there.
I'm not totally sure what you mean by how is the external portable HDD mounted.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.