LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 03-03-2017, 04:03 AM   #1
robertkwild
Member
 
Registered: Feb 2015
Posts: 382

Rep: Reputation: Disabled
show progress for command


hi all,

i have a bash script and when it comes into doing the move command i dont see jack i want to be able to see the progress of it like a progress bar or 0-100%

is this possible,

many thank,

rob
 
Old 03-03-2017, 04:17 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,308
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
It's not possible with plain mv, unless you modify the source to add that capability, but you can do it in two steps with rsync and rm. The option to look for in the rsync manual page is --progress. Maybe also --partial.

Code:
man rsync
Then if the transfer is successful, delete the old file.

If the two files are always going to be on the same partition then ln could be used to make the change instantaneous.
 
Old 03-03-2017, 04:21 AM   #3
robertkwild
Member
 
Registered: Feb 2015
Posts: 382

Original Poster
Rep: Reputation: Disabled
didnt even know rsync and rm you could do it with an option

whats ln?
 
Old 03-03-2017, 04:23 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Code:
man pv
 
Old 03-03-2017, 04:25 AM   #5
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,308
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
It makes links between files. A hard link just creates an additional name pointing at the same data. The data won't disappear until the last hardlink is removed. So if you create a new name in another directory, you then delete the old one without losing the data or even having to move it. However, hard links only work within the same partition and not across file systems.


PS. For your desktop: https://linuxmint.com/download.php
Linux Mint contains manual page for anything you might need.
 
Old 03-03-2017, 04:37 AM   #6
robertkwild
Member
 
Registered: Feb 2015
Posts: 382

Original Poster
Rep: Reputation: Disabled
ahh sorry me being dump hard link on same partition or soft links on different nfs share
 
Old 03-03-2017, 04:40 AM   #7
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,308
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Soft links won't work in this case.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Show Progress line. hack3rcon Linux - Software 1 06-22-2015 03:12 AM
Copy command to show progress bar or status sudo_su Linux - Newbie 5 08-03-2013 04:16 PM
show progress while using cp command qweyu Linux - Newbie 2 02-20-2013 05:09 AM
show cp progress with directories daisychick Linux - Newbie 12 02-16-2012 07:28 PM
How to use mv in console to show progress? Alinuxnoob Linux - General 4 09-15-2004 06:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 11:58 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
Open Source Consulting | Domain Registration