LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Why are files copied to a USB stick invisible? (https://www.linuxquestions.org/questions/linux-newbie-8/why-are-files-copied-to-a-usb-stick-invisible-4175530177/)

DougBain 01-06-2015 06:12 AM

Why are files copied to a USB stick invisible?
 
I recently crashed my LMDE system, and trying to retrieve something from the disaster, booted up the failsafe OS and copied a number of files onto a USB stick using the 'cp'command.
'ls -alrt /media/dougb' showed that the files were present and correct on the stick.

However when I attached the stick to a working LMDE PC there appeared to be nothing on it, whether I looked at the stick in the desktop file manager or by listing in a terminal.

I've tried changing the permissions and/or ownership of the files (via the broken OS) without success.

Why aren't the files visible? What can I do about it?

pan64 01-06-2015 06:20 AM

how did you copy those files? Probably you forgot to umount/eject that usb.

Higgsboson 01-06-2015 07:47 AM

Does your USB stick have persistence?

My live USB stick doesn't have persistence. So once I shutdown from the live USB, then all my browser preferences, copied files etc are automatically deleted.

yancek 01-06-2015 12:57 PM

Quote:

ls -alrt /media/dougb' showed that the files were present and correct on the stick.
I don't have LMDE but, if it is similar to the other Mint releases, the copy command you posted would have copied to the /media/dougb directory on the hard drive. You should have had another sub-directory there with either a UUID or the name you gave the disk. Did you do that and just post an incorrect cp command?

DougBain 01-07-2015 06:10 AM

[SOLVED] Thanks Yancek, that must be the answer. On checking 'ls -alrt' *without* the USB stick plugged in, the list of files comes up anyway.
With the USB plugged in I get no UUID or name, so I suppose the USB has to be mounted.
However 'mount -t <some type> /dev/sdb <previously defined dir>' is failing because I'm not able to specify the correct fstype.
Any suggestions?

pan64 01-07-2015 06:15 AM

what kind of filesystem was created on that usb stick?
probably you need to install cifs

michaelk 01-07-2015 06:26 AM

cifs is a network protocol (samba) and not a local filesystem. It is probably vfat.

pan64 01-07-2015 06:28 AM

yes, sorry I wanted to say ntfs....

DougBain 01-07-2015 06:34 AM

I tried '-t vfat' without success.
"FAT-fs: utf8 is not a recommended IO charset....
FAT-fs: bogus number of reserved sectors
FAT-fs: can't find a valid FAT filesystem................."

DougBain 01-07-2015 06:36 AM

"NTFS signature is missing"

michaelk 01-07-2015 06:41 AM

Post the output of the blkid command.

DougBain 01-07-2015 07:31 AM

"No command 'blkld' found, did you mean
'blkls'.....
'blkld' fom package 'util-linux'
blkld: command not found"

pan64 01-07-2015 07:33 AM

/sbin/blkid that is an i (not l) before the d at the end
you should run it as root

michaelk 01-07-2015 07:35 AM

You can also look at the output of the file command
file -s /dev/sdb1 (replace sdb1 with actual partition ID)

---------- Post added 01-07-15 at 07:35 AM ----------

You can also look at the output of the file command
file -s /dev/sdb1 (replace sdb1 with actual partition ID)

jpollard 01-07-2015 07:50 AM

Quote:

Originally Posted by yancek (Post 5296490)
I don't have LMDE but, if it is similar to the other Mint releases, the copy command you posted would have copied to the /media/dougb directory on the hard drive. You should have had another sub-directory there with either a UUID or the name you gave the disk. Did you do that and just post an incorrect cp command?

warning there - /media may be tmpfs on some distributions. It normally would be used only for temporarily mounting things like CDs and USB devices for the user, but once the user logs out (or reboots) everything is gone.


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