How to copy a file ? [Solved]

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
User avatar
Sybelius
Posts: 82
Joined: 9. Jan 2010, 01:51
Location: Gaborone - Botswana

How to copy a file ? [Solved]

Post by Sybelius »

Hi All :)

Please, I have a small problem: I should like to copy a file (.jpeg) from "Home/Immagini/Fotografie" on the 1st hard disk ( "/" partition) to the 2nd hard disk (Archive, formatted "Fat32").
I have been trying whit the command "cp -T" file name and destination footpath/folder name and also with "# chown -R user_name:users /root" without result.

Thank You for your kind attention. Ciao :)
Last edited by Sybelius on 14. Mar 2010, 16:28, edited 1 time in total.
User avatar
gapan
Salix Wizard
Posts: 6361
Joined: 6. Jun 2009, 17:40

Re: How to copy a file ?

Post by gapan »

How is the 2nd hard disk mounted? Is it perhaps mounted read-only? What's the output of

Code: Select all

mount
and

Code: Select all

cat /etc/fstab
Image
Image
User avatar
Sybelius
Posts: 82
Joined: 9. Jan 2010, 01:51
Location: Gaborone - Botswana

Re: How to copy a file ?

Post by Sybelius »

Hi Gapan,

Thank you for your concern, these are the data:

Code: Select all

dominum[~]$ mount
/dev/root on / type ext4 (rw,noatime,barrier=1,data=ordered)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sdb1 on /fat-c type vfat (rw)
tmpfs on /dev/shm type tmpfs (rw)
gvfs-fuse-daemon on /home/dominum/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=dominum)
dominum[~]$ 

Code: Select all

dominum[~]$ cat /etc/fstab
/dev/sda5        swap             swap        defaults         0   0
/dev/sda10       /                ext4        noatime,defaults 1   1
/dev/sdb1        /fat-c           vfat        defaults         1   0
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,users,rw,umask=00 0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0
dominum[~]$ 
Ciao
User avatar
gapan
Salix Wizard
Posts: 6361
Joined: 6. Jun 2009, 17:40

Re: How to copy a file ?

Post by gapan »

Can you change the fstab line to:

Code: Select all

/dev/sdb1        /fat-c           vfat        defaults,uid=1000,umask=022         1   0
and remount? Change the uid to the one of your user, if it's not 1000.
Image
Image
User avatar
Sybelius
Posts: 82
Joined: 9. Jan 2010, 01:51
Location: Gaborone - Botswana

Re: How to copy a file ?

Post by Sybelius »

Hi Gapan,

Please apologize me because I am a newbie; I have been trying to follow that teaching of yours and I have been
changing the file "fstab" using "nano" (I dont know well "nano", so, I hope I have been working properly).
Going to open "fstab" now, it comes out like this one:
/dev/sda5 swap swap defaults 0 0
/dev/sda10 / ext4 noatime,defaults 1 1
/dev/sdb1 /fat-c vfat defaults,uid=1000,umask=022 1 0
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,users,rw,umask=00 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
(The user's UID was 1000, so I have been copying exactly that string of yours).
Still unable to move the file from "home" to /dev/sdb1, sorry. Ciao

Edit: Gapan ! It works now ! - Before I have been trying without rebooting; after reboot, I have been able to move files from "/home" to "/fat-c" (/dev/sdb1).
Thank You very much for your kind and precious help. Ciao :)
Post Reply