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 01-25-2010, 01:46 PM   #1
SteveInTallyFL
Member
 
Registered: May 2008
Location: Tallahassee, FL
Distribution: RHEL4, RHEL 5, OEL4, OEL5
Posts: 65

Rep: Reputation: 17
How to capture elapsed time for a file copy command


I am troubleshooting file copy time issues between 3 servers. I need to copy the same file from server A to both server B and server C and compare the elapsed times for the copy. Is there an easy way to do this?
 
Old 01-25-2010, 01:55 PM   #2
kforbus
Member
 
Registered: Sep 2009
Location: Maryland
Distribution: Slackware
Posts: 68

Rep: Reputation: 28
There's probably a better way, but I usually just do something like this:
Code:
date && cp -R folder /destination && date
That will output the date/time, run the copy command, then output the date/time again.
 
1 members found this post helpful.
Old 01-25-2010, 02:05 PM   #3
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
The time command will do that.
eg.
Code:
time scp file host:
You can pass all sorts of flags to time. Have a look at the man page.

Evo2.
 
Old 01-25-2010, 02:08 PM   #4
kforbus
Member
 
Registered: Sep 2009
Location: Maryland
Distribution: Slackware
Posts: 68

Rep: Reputation: 28
Quote:
Originally Posted by evo2 View Post
The time command will do that.
eg.
Code:
time scp file host:
You can pass all sorts of flags to time. Have a look at the man page.

Evo2.
Good call. I didn't even think about the time command.

Is it Friday yet?
 
  


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
Bash: how to get time (in seconds) elapsed since creation of a file? J_Szucs Linux - General 6 12-28-2008 12:28 AM
Get elapsed time HarryBoy Programming 2 08-08-2008 07:13 AM
diff. between elapsed time and cpu time madhugp Linux - General 1 01-15-2007 08:57 AM
find elapsed time innuendo_98 Programming 2 11-10-2005 09:03 AM
getting elapsed time.. Mad_C Programming 2 04-01-2003 02:12 AM


All times are GMT -5. The time now is 08:32 AM.

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