LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-09-2015, 07:40 AM   #16
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by rtmistler View Post
After the point where you issued that command, you can then re-issue just "mount" and that will show you a list of what is mounted versus not. The presumption is that you'll see something similar to:
Code:
/dev/sdd1 on /mnt type vfat (bunch of other stuff)
If you do not, then the mount command did not succeed. If you do see that it is mounted on /mnt and when you perform an "ls" command there's nothing shown in /mnt, then it may be that the USB drive is empty. Do you know that there are any files on that USB drive? Note you can also use the "df" command to ascertain how much data is on a particular drive and partition:
Code:
df /dev/sdd
df /dev/sdd1
You can also use the "du" command to determine how large the information is on a given mounted drive:
Code:
du -S /dev/sdd1
If that shows as zero, then there are simply no files there. The first thing to do is verify that the mount succeeded. I'm assuming there was no error report after the mount command?
#mount
it gave :

/dev/sdd1 on mnt type vfat (rw)

# ls :
gave nothing

#df /dev/sdg1 ( name changes on unplugging and re-plugging )
gave:
File System 1k-block used Available Use% Mounted on
/dev/sdg1 7813184 476 7812708 1% /mnt
I need to copy a file from linux system to the flash drive .
how can I do so ?

Last edited by esraam; 06-09-2015 at 07:44 AM.
 
Old 06-09-2015, 07:44 AM   #17
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,939
Blog Entries: 13

Rep: Reputation: 4971Reputation: 4971Reputation: 4971Reputation: 4971Reputation: 4971Reputation: 4971Reputation: 4971Reputation: 4971Reputation: 4971Reputation: 4971Reputation: 4971
Quote:
Originally Posted by esraam View Post
#mount
it gave :

/dev/sdd1 on mnt type vfat (rw)

# ls :
gave nothing

I need to copy a file from linux system to the flash drive .
how can I do so ?
Looks like it's mounted and there are simply no files on that drive.

Copy using either the File Manager or the cp command.
 
Old 06-09-2015, 07:46 AM   #18
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
Looks like it's mounted and there are simply no files on that drive.

Copy using either the File Manager or the cp command.
assuming i have a file called log.txt on the following directory :
/em/htk

What line can copy this file to the drive ?

OR using file manager ?
How?
I am unable to open the folder of the drive to paste in ?
 
Old 06-09-2015, 07:53 AM   #19
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,939
Blog Entries: 13

Rep: Reputation: 4971Reputation: 4971Reputation: 4971Reputation: 4971Reputation: 4971Reputation: 4971Reputation: 4971Reputation: 4971Reputation: 4971Reputation: 4971Reputation: 4971
Code:
cp log.txt /mnt/.
OR:

Code:
sudo cp log.txt /mnt/.
 
Old 06-09-2015, 07:54 AM   #20
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
What does umount -a does ?

Last edited by esraam; 06-09-2015 at 07:55 AM.
 
Old 06-09-2015, 08:04 AM   #21
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
Code:
cp log.txt /mnt/.
OR:

Code:
sudo cp log.txt /mnt/.
Isn't there any method to open the flash drive folder using the GUI ?
I wrote the above #cp command
How can I know if the file was copied or not ?
How can I open the flash folder ?
 
Old 06-10-2015, 07:31 AM   #22
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Quote:
Disk /dev/sde: 8021 MB
Above means a device with 8021MB(8GB) of space present.

Quote:
/dev/sde1 * 51 97920 7829568 b W95 FAT32
Above means a partition 'sde1' present in device 'sde' With FAT32 filesystem.

So you mount with:

Code:
sudo mount -t vfat /dev/sde1 /mnt
ls -l /mnt
 
Old 06-10-2015, 07:36 AM   #23
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Quote:
umount -a
Read man page of 'mount'. Above command unmounts all the filesystem listed in '/etc/fstab'.

Quote:
How can I know if the file was copied or not ?
You can use the 'ls' command for the destination directory to see it got copied.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB flash memory godfather9112 Linux - Hardware 2 10-20-2014 09:24 PM
USB flash memory laryy Slackware 8 07-17-2007 08:35 PM
USB memory, Compact Flash, Memory Stick energiza Linux - Hardware 2 08-22-2006 10:29 PM
Missing memory in USB stick, flash memory, removable hd etc bamboo_spider Linux - Newbie 3 06-14-2006 06:39 PM
Yet another USB/Flash Memory can't get to work problem maddogdelta Linux - Hardware 7 05-15-2004 06:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration