copy / move how to

OK like anything once you know how to do something it’s easy, well, I know diddly squat about Linux, I’ve tinkerd with a few live cd’s but thats about it.

I now need to do something via telnet into my nslu2 box, I want to transfer a chunk of data from one drive to another, I’m curently doing it via a windows machine but as you know in the process the data is coppied from theremote drive, to the local machine and them back to the remote machine. With 100Gb+ of data you can appreciate this is taking some time, I thought it’d be easier to telnet into the thing and get the box to do it itself. but I have no idea how.

the data needs to go from one drive to another, currently there is a share set at the root of each drive, and the data folders are the same, disk1 and disk2
\The_slug\admin 1\public
\The_slug\admin 2\public

if someone could tell me what to do I’d be most gratefull,

Damski

I assume it maybe the same via telnet but I’ve not used it but I dont know…

the linux command for copying is cp

cp source dest

Mind you can see the trouble I had with that here :wink:
http://forums.teamphoenixrising.net/showthread.php?p=373126#post373126

Were you asking for the cp and mv commands, or how to telnet?

Scrooge, I can telnet into the device fine, it’s just the line or lines of command I was after,

drezha, I’ll give that a go now & let you know how I get on

Okay, I wasn’t sure. Just to add, if you need to also copy subdirectories or preserve file permissions use the options -r and -p (recursive and permissions). :slight_smile:

Use rsync if it’s installed :wink:

I linked to a topic where I’d been trying to back up a directory in Backup Scripts in the Coding Section… It wasn’t helping much…

EDIT:

Just had a thought, if it’s a whole directory and not just select files, cp should probably be fine :slight_smile:
I was only after changed files…

pah, only got a handfull of commands, so given up, using the via another machine method, shouldn’t take more than a day!

I take it this is to the piggy ?

DT.

telnet to the box…
cp -R /The_slug/admin 1/public /The_slug/admin 2/public

that will copy everything under “admin 1/public” to “admin 2/public”

if there are actual spaces between admin and 1 you may need
cp -R /The_slug/admin\ 1/public /The_slug/admin\ 2/public

[QUOTE=Spaceboy;373204]telnet to the box…
cp -R /The_slug/admin 1/public /The_slug/admin 2/public

that will copy everything under “admin 1/public” to “admin 2/public”

if there are actual spaces between admin and 1 you may need
cp -R /The_slug/admin\ 1/public /The_slug/admin\ 2/public[/QUOTE]

Hell yes! Don’t leave out the -R 'cos that makes it recursive.