Bulk move in ssh command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Bulk move in ssh command
# 1  
Old 05-28-2010
Bulk move in ssh command

Hi All,

I am getting an problem. I am using ssh command in shell script to copy all files from a dir to another.
Code:
find /home/dee -type f ! -newer /tmp/new | xargs -i cp {} /home/past{}

This works fine but when I replace cp with mv, nothing happens! not even error.

Can anybody please help! Thanks

---------- Post updated at 09:19 AM ---------- Previous update was at 08:45 AM ----------

Its done!! problem was in - newer option !!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Move and Rename in One Command

Hey all, I really need help with some homework I'm having on UNIX. This probably sounds stupid, but I'm being asked to move a file to a specific directory and rename it a specified name in one command. I know how to do it in more than one command, I just can't seem to figure it out using only one... (1 Reply)
Discussion started by: ayylmao12
1 Replies

2. Shell Programming and Scripting

Help with move command

I need help with a move command from one folder to another In current folder there are files like test_1.txt, test_2.txt I want to move this to another folder /archive with renaming files as test_1_old.txt, test_2_old.txt (actually in old it should be a timestamp which I do it through etl... (8 Replies)
Discussion started by: eskay
8 Replies

3. UNIX for Dummies Questions & Answers

Help required with move command

Hi I need to move the first file in a folder to an another folder but am facing issues with the below cmd. CAN someone correct me Ex : Folder :data/cat/tst ad2 ad4 ad5 ad6 output req: data/cat/man ad2 Command Used : ls -lt ad*|head -1|mv/data/cat/man (3 Replies)
Discussion started by: akshay01987
3 Replies

4. UNIX for Dummies Questions & Answers

Move command within script

Anyone have an idea to why the statement below does not work within a script but works when issued from the command line? mv /dir_files/submit.log* /bintemp (1 Reply)
Discussion started by: bwcberb
1 Replies

5. Solaris

Change passwd for bulk servers using SSH script

Hi, I need to Change passwd for bulk servers using SSH script. I have one server, from which i can reach all the servers without password via SSH. There is some expect script, from which i can achieve it. Can any one help me out here. Thanks in advance. Vicky (1 Reply)
Discussion started by: vickyingle5
1 Replies

6. Shell Programming and Scripting

Question about move command

Is there a way to undo a move after running a command such as this: find ./* -type f -name "*.pdf" -exec mv {} /new/dir \; :confused: (3 Replies)
Discussion started by: bbbngowc
3 Replies

7. Shell Programming and Scripting

Need help on move (mv) command

Hi all, I am using c-shell ,Sun OS. When i am trying to move (mv) a file size more then 2 GB i am getting error like -- parameter value too high -- also ls -ltr command was not working on that . But when i move a file of size less then or just above 2gb ,It is working fine . Can... (2 Replies)
Discussion started by: jambesh
2 Replies

8. UNIX for Dummies Questions & Answers

.ssh directory question (Can i move it)

Hi All, pn:/wrk/an/tran/cr>) ls -ld .ssh drwx------ 2 crcv1ftp canusr 96 May 2 2007 .ssh I had .ssh directory inside a directory . When i trying to do find and delete automatic script . The find comman is failing saying it dont have permision to read .ssh . Can i move... (4 Replies)
Discussion started by: arunkumar_mca
4 Replies

9. Solaris

move command

Hi, I am using SOLARIS 9. I am trying to move a huge number of files using the mv commands below- #mv inbuffer/* /tmp/inbuffer/ but system says arguments too long.. Could u please tell which command i need to put for moving AND copying ??? Many Thanks in advance-- Purple (3 Replies)
Discussion started by: thepurple
3 Replies

10. UNIX for Dummies Questions & Answers

Help on MOVE command

Hi all, I'd like to use advanced features of mv command. Is it possible to move all files except one based on his extension ? I'm searching something like "mv *.* -*.xxx /dest_dir" ... Thanks all Michel. (2 Replies)
Discussion started by: michelr
2 Replies
Login or Register to Ask a Question
SSH-COPY-ID(1)						      General Commands Manual						    SSH-COPY-ID(1)

NAME
ssh-copy-id - install your public key in a remote machine's authorized_keys SYNOPSIS
ssh-copy-id [-i [identity_file]] [user@]machine DESCRIPTION
ssh-copy-id is a script that uses ssh to log into a remote machine and append the indicated identity file to that machine's ~/.ssh/autho- rized_keys file. If the -i option is given then the identity file (defaults to ~/.ssh/id_rsa.pub) is used, regardless of whether there are any keys in your ssh-agent. Otherwise, if this: ssh-add -L provides any output, it uses that in preference to the identity file. If the -i option is used, or the ssh-add produced no output, then it uses the contents of the identity file. Once it has one or more fin- gerprints (by whatever means) it uses ssh to append them to ~/.ssh/authorized_keys on the remote machine (creating the file, and directory, if necessary.) NOTES
This program does not modify the permissions of any pre-existing files or directories. Therefore, if the remote sshd has StrictModes set in its configuration, then the user's home, ~/.ssh folder, and ~/.ssh/authorized_keys file may need to have group writability disabled manu- ally, e.g. via chmod go-w ~ ~/.ssh ~/.ssh/authorized_keys on the remote machine. SEE ALSO
ssh(1), ssh-agent(1), sshd(8) OpenSSH 14 November 1999 SSH-COPY-ID(1)