w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
how to copy the folder in my home directory to the external hard drive

As reported by mount, your drive is mounted in /var/run/media/martin/32_00_00 not /var/run/media/martin/32_00_00/a_backup_martin_samsung. You can copy your whole directory to that mounted directory with

cp -a martin /var/run/media/martin/32_00_00/

Or if you want it copied as a renamed folder granting that /var/run/media/martin/32_00_00/a_backup_martin_samsung does not exist:

cp -a martin
/var/run/media/martin/32_00_00/a_backup_martin_samsung

Or you can rename it to another more meaningful name:

cp -a martin
"/var/run/media/martin/32_00_00/martin-backup-$(date +%F)"

Which would copy /home/martin as something like /var/run/media/martin/32_00_00/martin-backup-2014-07-26.

And I recommend using -a over -r as it doesn't dereference links and it preserves all properties.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.