Jump to content

Recommended Posts

Posted (edited)

Edit following a large bit of dyslexia :lol:

 

BTW This is just me trying to find out what the correct command is - I can workaround the problem :)

 

I am attempting to copy across the whole of /etc/cups from an eeepc to a pen drive to see if this is a simpel way of cloning printer setup from one to another.

 

The pendrive path is long and to save typing it in I was trying to use

cp -r /etc/cups .

having first navigated to the pendrive folder, but this ends up creating a folder called cups on the pendrive and not a folder called etc with a cups folder within that as I wanted/expected.

 

Is there syntax to do what I want?

 

regards

 

Simon

Edited by SimpleSi
Posted
You'll probably have to use 'sudo' before the command; there's protected system stuff in cups.

 

Edit: maybe not - eepcs are a lot more open than regular linux machine.

 

/etc/cups isn't very sensitive so you can normally read from it. If you were using rm, yes you'd have to be root.

Posted

Soory about my writing rm instead of cp :doh:

 

Just for a bit of clarifcation :)

 

I was trying to copy whole of /etc/cups to pen drive folder so I can transfer to anothe eeePC

 

pen drive path is very long and full of spaces/capitals e.g

 

/media/DataTraveler 2.0/KINGSTON and I've created a folder on there called asusk so full path is

 

/media/DataTraveler 2.0/KINGSTON/asusk

 

Its very easy to get to this path via file manger when pen drive is pluuged in and then just do a Ctrl-Shift-T to bring up a terminal window and a quick sudo su and I'm nicely in my dest folder.

 

Then I'd just like to copy the whole of /etc/cups to my current path

 

cp -r /etc/cups/* .

 

is the one that does it :)

 

Ta everyone and sorry for mix up :)

 

regards

 

Simon

Posted

if you want to copy directory's you must 'force' cp to do so.

 

cp -rf /etc/cups /mnt/PENDRIVE/

 

will copy /etc/cups and all it's contents (assuming you have permissions to read the files/folders) to /mnt/PENDRIVE

Posted

The pendrive path is long and to save typing it in I was trying to use

 

Create a shell script with Geoff's command and run that, less typing for you. Geoff may me able to help here not sure but wouldn't the --preserve switch keep all the file permissions?

 

cp --preserve -rf /etc/cups /mnt/PENDRIVE/

 

You may also have to create that mount point.

Posted
you can just use '-P' rather than '--preserve'. However if things are getting fiddly, you'd be better tarballing the directory up and moving it around wrapped up like that.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...