LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   can longer copy files to my empty USB pen drive on DSL - "no space left on device" (http://www.linuxquestions.org/questions/linux-newbie-8/can-longer-copy-files-to-my-empty-usb-pen-drive-on-dsl-no-space-left-on-device-712396/)

misterfever 03-17-2009 11:58 PM

can longer copy files to my empty USB pen drive on DSL - "no space left on device"
 
I'm brand new to Linux. In order to save some files from a few hard drives after a major system crash, my only success has come from using Damn Small Linux bootable CD - it's great.

I have been copying files onto my USB pen drive then carting them to my laptop for backup. Randomly I now get the error: "no space left on device", even though I have deleted all of the files on the drive. This exact drive was working perfectly and now will not work at all!

Any ideas? Please be as specific as possible - I'd like to learn this interface well but I am starting from scratch here. Thanks so much.

-Johnathan

ps_sabu 03-18-2009 01:37 AM

Tried reformatting Pendrive ????

misterfever 03-18-2009 08:43 AM

No, I haven't done that - should I have to? It was working fine before. I will try it but I'm not sure how to do it - can you point me in the right direction please?

Thanks -
J

bitpicker 03-18-2009 08:52 AM

If you delete files from a USB stick with a graphical file manager what actually happens is that the files get moved to a hidden folder which is part of the recycle bin. So they are still taking up space. Empty the bin and you should be able to use the stick again.

Robin

misterfever 03-18-2009 09:24 AM

Thanks Robin - how to find the hidden folder? Do I need to do that in Windows or is there a way to do it in Lunix? Thanks again.

onebuck 03-18-2009 09:39 AM

Hi,

How are you copying the files from the 'USB'?

Spudley 03-18-2009 09:55 AM

It is perfectly possible to reformat a pendrive, and probably a good idea if you're getting odd filesystem errors as you describe. If you do this, you would be best advised to format it in FAT32 format, so that it is still readable on Windows machines as well as Linux.

I doubt it's a trashcan issue -- AFAIK both KDE and Gnome delete the file outright if it's on a pendrive. The trashcan is only used for local filesystems. If it is in the trash and if that's the problem, you should be able to get rid of it by using the "Empty Trash" option on the desktop. On my KDE desktop, that's an icon in the bottom-right of the screen.


One thing that no-one's mentioned yet is the possibility that the pendrive has developed a fault.

The flash memory used in pendrives is only good for a limited number of writes, so one that has had a lot of files copied onto it and deleted (which is what you've described) may well reach the end of its lifespan.

I had one which failed a few months ago. In my case, it became impossible to delete files from it. It was a very old drive (only 128meg), and I wanted an upgrade anyway, so I just destroyed it and bought a new one.


Finally, a few other things to check -- does this happen with this pendrive in other computers? And how about other pendrives in your computer? Just so you can nail it down to definitely being a problem with this specific pendrive.

bitpicker 03-18-2009 10:08 AM

Quote:

I doubt it's a trashcan issue -- AFAIK both KDE and Gnome delete the file outright if it's on a pendrive. The trashcan is only used for local filesystems. If it is in the trash and if that's the problem, you should be able to get rid of it by using the "Empty Trash" option on the desktop. On my KDE desktop, that's an icon in the bottom-right of the screen.
I have found that both Nautilus in Gnome and Thunar in XFce will move the file to the trashcan. I've had that happen with USB sticks and mp3 players. That's why I do most file management in mc, that way something really gets deleted and I always see the hidden files.

Robin

malwodyn 03-18-2009 10:20 AM

I had a somewhat similar problem with a USB memory stick recently. I wanted to copy some files (.JPG images mostly) from a laptop running Fedora 10 onto a memory stick. The GUI refused me access to the stick, although I could read the files on it; nor could I even delete two files in the root directory. A friend, more experienced than I in the ways of Linux, and with access to the /root and superuser powers could not do anything at the command line either!! Worse still, I WAS able to use Window$ to carry out the file operations!!

akuthia 03-18-2009 11:07 AM

i can verify that ubuntu leaves them in a trash can on the drive. i had deleted some files from my thumbdrive, and took it over to my windows machine, and i could actually see the trashcan as a file :D

malekmustaq 03-18-2009 11:49 AM

misterfever:

Your pendrive is still good. But space issue is quite perplexing. Here is the solution:

1. There is possibility that your hidden trashcan is in the usb pendrive, thus being full but unseen. Do this --

=> Access the usb pendrive through the terminal, be a root, delete/empty the trashcan.
Syntax:
# ls -al (find out owners of contents)
# chown root:root *
# rm -fr *
Under normal conditions, the bin should be empty.

2. There is also possibility (in some distros) that deleted files from pendrive are stored in the /home/user/.folder but when pendrive is attached it reads status from that hidden folder. Do this --

=> Go to .local under your /home/usr directory and delete/empty the trashcan.
Syntax:
# cd /home/usr/ (be a root first to avoid delay tactics)
# ls -al (here find that ".local" folder)
# cd ./.local
# ls -al (here find that /recyclebin/file/ folder)
# cd ./whatever-it-is-called/file
# chown root:root *
# rm -fr *

Detach your usb-pendrive. Attach again to have it run a new reading. This time you should be able to have good writable space.

Hint: If you are certain at removing files from usb pendrive you should press Shift+clicking Delete if you don't want to accumulate garbage in the trashbin.

Hope it helps.

misterfever 03-18-2009 04:42 PM

I'm very impressed by the responses I've gotten. Thanks so much.

I'll try and respond to all comments in this reply. The confusing thing for me is that I was able to fill up this pendrive (4 GB), unplug it, dump it onto my laptop for backup onto an external drive, then empty it, then plug it back into the machine running DSL and repeat the whole process. I probably did this 5 times before the space issue arose. Maybe I deleted the files from Windows every time except the last time, when I might very well have deleted it inside DSL - in fact I believe I did. If it treats it differently, this may explain it all.

Regarding the "terminal" - I think I recall seeing this option in one of the few icons in DSL - I can probably find it.

In response to onebuck, I was mounting the pendrive, opening the file manager that comes with DSL (not using the "superuser" option, whatever that means), then highlighting and clicking "copy" when the right folders ere selected. Seemed like the straightforward route. I'll try the shift-clicking from now on.

I'll try what you all suggested this evening and let you know how it goes. Fortunately pendrives are dirt cheap now. I suppose I could try and hook a DVD burner up to the machine and burn data DVDs instead, but why bother - this is so much faster.

Thanks again folks.


All times are GMT -5. The time now is 03:55 AM.