LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   monitoring copying process (https://www.linuxquestions.org/questions/linux-newbie-8/monitoring-copying-process-927618/)

saleh.samy 02-04-2012 03:07 PM

monitoring copying process
 
i am connecting to my linux server through ssh software like putty
i make copy for large size directory
so i need away to know if the coping process is finished or not when i close the session .

sys64738 02-04-2012 07:43 PM

Hi
more info.
How do you copy?
Local copy on remote system? download to your system? upload from your system?

saleh.samy 02-05-2012 02:09 AM

the directory copied from the linux server to it self by "cp" command

fukawi1 02-05-2012 02:31 AM

To the best of my knowledge, cp doesnt support any form of "progress bar". But you can add the -v option to verbosely copy, and generally get a rough idea by looking at the output where you can get an idea of the progress alphabetically.

lithos 02-05-2012 04:29 AM

I would maybe get a look at inotify / incrond or here
and get inotify to "alert" you when done copying (IN_CLOSE_WRITE File opened for writing was closed (*))

good luck

saleh.samy 02-05-2012 04:46 AM

the sequence i suppose to do is

nohup cp /target /dist &

so when i close my ssh terminal the copying still in progress in background

i need to know if the copying finished or not when i open new ssh session

saleh.samy 02-05-2012 05:42 AM

or how to use ps command to see copying process

sys64738 02-05-2012 06:16 AM

how about this? :
http://chris-lamb.co.uk/2008/01/24/c...bar-like-wget/

saleh.samy 02-05-2012 07:16 AM

what will happen when close the ssh terminal
and how to save that script to be use the cp_p without run it again

allend 02-05-2012 07:39 AM

I suggest you learn to use the detach and reattach facilities in 'screen'. e.g. http://www.rackaid.com/resources/lin...al-and-how-to/
You can detach the process running the copy and logout from your ssh connection. You can reconnect and reattach to the copy process. You can also open another shell to look at the progress of the copy process.

If you have typed a command and want to save it in a file, you can simply hit the up arrow key to bring back the command, then edit the line to 'echo "<your command>" > <your file>'.

saleh.samy 02-05-2012 01:44 PM

thank u so much for ur effort ... that was very helpful


All times are GMT -5. The time now is 06:42 AM.