LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-04-2012, 03:07 PM   #1
saleh.samy
LQ Newbie
 
Registered: Feb 2012
Posts: 6

Rep: Reputation: Disabled
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 .
 
Old 02-04-2012, 07:43 PM   #2
sys64738
Member
 
Registered: May 2008
Location: NRW/Germany
Posts: 105

Rep: Reputation: 30
Hi
more info.
How do you copy?
Local copy on remote system? download to your system? upload from your system?
 
Old 02-05-2012, 02:09 AM   #3
saleh.samy
LQ Newbie
 
Registered: Feb 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
the directory copied from the linux server to it self by "cp" command
 
Old 02-05-2012, 02:31 AM   #4
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 190Reputation: 190
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.
 
Old 02-05-2012, 04:29 AM   #5
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
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
 
Old 02-05-2012, 04:46 AM   #6
saleh.samy
LQ Newbie
 
Registered: Feb 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
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
 
Old 02-05-2012, 05:42 AM   #7
saleh.samy
LQ Newbie
 
Registered: Feb 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
or how to use ps command to see copying process
 
Old 02-05-2012, 06:16 AM   #8
sys64738
Member
 
Registered: May 2008
Location: NRW/Germany
Posts: 105

Rep: Reputation: 30
how about this? :
http://chris-lamb.co.uk/2008/01/24/c...bar-like-wget/
 
Old 02-05-2012, 07:16 AM   #9
saleh.samy
LQ Newbie
 
Registered: Feb 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
what will happen when close the ssh terminal
and how to save that script to be use the cp_p without run it again
 
Old 02-05-2012, 07:39 AM   #10
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,539

Rep: Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419
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>'.
 
1 members found this post helpful.
Old 02-05-2012, 01:44 PM   #11
saleh.samy
LQ Newbie
 
Registered: Feb 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
thank u so much for ur effort ... that was very helpful
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
zabbix process monitoring fernfrancis Linux - Newbie 2 06-13-2011 12:32 PM
[SOLVED] Need help about monitoring process memory koshihaku Linux - Server 8 08-11-2010 06:39 AM
Process Monitoring Software FourierXForm Linux - Software 3 07-05-2006 01:28 PM
Process Monitoring arb Linux - Newbie 1 09-15-2003 08:35 AM
Process monitoring arb Linux - General 3 09-15-2003 03:29 AM


All times are GMT -5. The time now is 10:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration