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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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
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
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
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
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.
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 07:19 PM.
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.
Last edited by andrew.comly; 08-02-2013 at 12:26 PM.
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
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/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.