Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 19th January 2009, 12:45 PM
vonedaddy Offline
Registered User
 
Join Date: Oct 2007
Posts: 141
Question about mv command

I have read the man page but I thought I saw this done somewhere else.

Anyway, I routinely have to move around large files via ssh. Is there anyway I can see the progress of the mv while its happening?

For example, if I use ftp via the command line I can enter hash mode which shows me a # as I am transferring.

Just wondering if there was anything similar to this with the mv or cp commands??
Reply With Quote
  #2  
Old 19th January 2009, 12:51 PM
aleph's Avatar
aleph Offline
Banned (for/from) behaving just like everybody else!
 
Join Date: Jul 2007
Location: Beijing, China
Posts: 1,307
Something like this may help?

Code:
$ mv /path/to/file . & watch ls -l file
No progress bar but you get a report on the file status every two seconds.
__________________
I believe in nerditarianism. I read FedoraForum for the Fedora-related posts.
Reply With Quote
  #3  
Old 19th January 2009, 02:08 PM
Carme Offline
Registered User
 
Join Date: Dec 2008
Posts: 83
scp copies files over ssh and displays its progress.
Reply With Quote
  #4  
Old 19th January 2009, 02:23 PM
vonedaddy Offline
Registered User
 
Join Date: Oct 2007
Posts: 141
Quote:
Originally Posted by Carme View Post
scp copies files over ssh and displays its progress.
I am not copying, I am moving files from one filesystem to another on the same machine.
Reply With Quote
  #5  
Old 19th January 2009, 02:29 PM
Carme Offline
Registered User
 
Join Date: Dec 2008
Posts: 83
So use scp to copy and then delete the original. It can copy locally.
Reply With Quote
  #6  
Old 19th January 2009, 02:39 PM
vonedaddy Offline
Registered User
 
Join Date: Oct 2007
Posts: 141
Quote:
Originally Posted by Carme View Post
So use scp to copy and then delete the original. It can copy locally.
hmmm... never thought of that. I will give it a try
Reply With Quote
  #7  
Old 19th January 2009, 02:40 PM
sideways's Avatar
sideways Offline
Retired User
 
Join Date: Oct 2004
Location: London, UK
Posts: 4,999
use pv command (yum install pv) with cat, then rm the original afterwards

Code:
cat <sourcefile> | pv -s <filesize> -p -e -r > <destinationfile>
rm <sourcefile>
http://jkeating.livejournal.com/64342.html

edit: last comment on that page suggests you can just do

Code:
pv  -p -e -r -n sourcefile > destinationfile

Last edited by sideways; 19th January 2009 at 02:49 PM.
Reply With Quote
  #8  
Old 19th January 2009, 03:41 PM
aleph's Avatar
aleph Offline
Banned (for/from) behaving just like everybody else!
 
Join Date: Jul 2007
Location: Beijing, China
Posts: 1,307
Quote:
Originally Posted by sideways View Post
use pv command (yum install pv) with cat, then rm the original afterwards

Code:
cat <sourcefile> | pv -s <filesize> -p -e -r > <destinationfile>
rm <sourcefile>
http://jkeating.livejournal.com/64342.html

edit: last comment on that page suggests you can just do

Code:
pv  -p -e -r -n sourcefile > destinationfile
wow, that's cool
__________________
I believe in nerditarianism. I read FedoraForum for the Fedora-related posts.
Reply With Quote
Reply

Tags
command, question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
question about ls command chud Linux Chat 1 20th December 2005 04:18 PM
Tar command question satimis Using Fedora 1 21st May 2005 11:44 AM
Command question satimis Using Fedora 6 17th April 2005 01:13 PM
question about who command? Linuxxx Using Fedora 4 13th April 2005 11:51 PM
Command question satimis Using Fedora 3 4th April 2005 01:41 PM


Current GMT-time: 06:55 (Thursday, 20-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat