maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Help with cp command (https://talk.maemo.org/showthread.php?t=58695)

neilosleeman1979 2010-07-18 17:57

Help with cp command
 
Hi,
I have changed a lot of my icons and I would like to copy the folder with all the icons in to make kind of a backup. I have made a folder on the emmc called icons and using xterm I have run the following command:

sudo gainroot
cp \usr\share\icons\* \home\user\MyDocs\icons

but it doesn't work. I get an error - 'omitting directory \usr\share\icons\default' and ''omitting directory \usr\share\icons\hicolor'

Any offers of help?

ToJa92 2010-07-18 18:04

Re: Help with cp command
 
You should use / instead of \ .

Joorin 2010-07-18 18:10

Re: Help with cp command
 
And perhaps add -r to make it into a recursive copy.

Please keep in mind that you can not create symbolic links under MyDocs.

neilosleeman1979 2010-07-18 18:27

Re: Help with cp command
 
Quote:

Originally Posted by Joorin (Post 755982)
And perhaps add -r to make it into a recursive copy.

Please keep in mind that you can not create symbolic links under MyDocs.


tried -r option and i get plenty of errors stating 'cannot create symlink'

Is there no way to copy all the icons?

simoneb 2010-07-18 18:27

Re: Help with cp command
 
mind that the "*" will copy only non-hidden files (those not beginning with ".")

so either check for them or instead use
cp -r /usr/share/icons /home/user/MyDocs
this will copy the entire folder

neilosleeman1979 2010-07-19 09:46

Re: Help with cp command
 
Anyone got any ideas?

Joorin 2010-07-19 10:01

Re: Help with cp command
 
The obvious solution is to copy the icons you want to a place where symbolic links can be created.

One such place is /home/user . Create a directory there and copy to it. Just keep in mind that the size of this partition is 2GByte and it's used by other applications to store data.

neilosleeman1979 2010-07-19 10:04

Re: Help with cp command
 
How do I then copy from /home/user to a pc via usb?

RobbieThe1st 2010-07-19 10:06

Re: Help with cp command
 
OP, your two problems are:
1. backslashes( \ ). These are NOT USED for directory seperation in Linux. In windows, yes, but not in Linux. Use forward-slashes instead( / ) (as ToJa92 already said).
2. no '-r' option for recursive copying. (as Joorin already said).

Do -both- of these things.

DrWilken 2010-07-19 10:11

Re: Help with cp command
 
You could also create a zip file instead:
Code:

zip -r /home/user/MyDocs/icons/icon_backup.zip /usr/share/icons
EDIT: The above is ONE line (with a space between the filename and the directory to backup).

And if You want a date/time stamp (day-month-year-hour-minute) on the file too do it like this:
Code:

DATE=`date +%d%m%y-%H%M`
zip -r /home/user/MyDocs/icons/icon_backup-$DATE.zip /usr/share/icons

(That's 2 lines)... ;)

EDIT: zip and unzip commands can be installed using:
Code:

apt-get install zip unzip
(or through the App Manager - search for "zip" in All applications)

neilosleeman1979 2010-07-19 10:11

Re: Help with cp command
 
Lovely.

Now how do I get the folder of icons from the phone to my pc?

DrWilken 2010-07-19 10:16

Re: Help with cp command
 
If You use my example the zip file would be under icons when You mount it from WinBlows... ;)

neilosleeman1979 2010-07-19 10:28

Re: Help with cp command
 
Cheers DrWilken - thats done it.

DrWilken 2010-07-19 10:31

Re: Help with cp command
 
You'r welcome (there's a "Thanks!" button)... :D


All times are GMT. The time now is 11:55.

vBulletin® Version 3.8.8