LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 02-21-2012, 07:46 AM   #16
Leonardo Barbosa
LQ Newbie
 
Registered: Feb 2012
Posts: 1

Rep: Reputation: Disabled

Thanks to talavishay!

I just searched google and actually I had in mind using rsync to move the files (didn't use the word in the search query though), just wanted to know the "good" parameters.

Then I saw all this fuss about old threads and stuf... and since I normally end up in linuxquestions.org though google, I thought it would be good to let my testimony that a really old, unsolved thread, was ranked second by google and the rsync stuff solved my problem (better then installing a new programm... )
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 02-21-2012, 08:15 AM   #17
uhelp
Member
 
Registered: Nov 2011
Location: Germany, Bavaria, Nueremberg area
Distribution: openSUSE, Debian, LFS
Posts: 205

Rep: Reputation: 43
A little bash function and it's usage.
With this function you dan make all commands showing a spinner
Code:
sp="/-\|"
sc=0
spin() {
   printf "\b${sp:sc++:1}"
   ((sc==${#sp})) && sc=0
}
endspin() {
   printf "\r%s\n" "$@"
}

until work_done; do
   spin
   some_work ...
done
endspin
And a progressbar deploying "dialog" a ncurses cmd line programm:
Code:
# Bash
# Process all of the *.zip files in the current directory.
files=(*.zip)
dialog --gauge "Working..." 20 75 < <(
   n=${#files[*]}; i=0
   for f in "${files[@]}"; do
      # process "$f" in some way (for testing, "sleep 1")
      echo $((100*(++i)/n))
   done
)
displaying "x% complete"
Code:
i=0
while ((i < 100)); do
  printf "\r%3d%% complete" $i
  ((i += RANDOM%5+2))
  # Of course, in real life, we'd be getting i from somewhere meaningful.
  sleep 1
done
echo
and a progressbar
Code:
files=(*)
width=${COLUMNS-$(tput cols)}
rev=$(tput rev)

n=${#files[*]}
i=0
printf "$(tput setab 0)%${width}s\r"
for f in "${files[@]}"; do
   # process "$f" in some way (for testing, "sleep 1")
   printf "$rev%$((width*++i/n))s\r" " "
done
tput sgr0
echo
There are some programms out helping with that:
A PipeViewer
The CommandLineProgressBar

All this is taken from bashFAQs
Reading this will show you how all this works

Last edited by uhelp; 02-21-2012 at 08:17 AM.
 
Old 05-26-2012, 12:15 PM   #18
stayupthetree
LQ Newbie
 
Registered: May 2012
Posts: 1

Rep: Reputation: Disabled
I to was in search of the answer that he provided. Just an FYI if you arent happy with the date and time business or people coming to old threads, then dont let google index your site because when I was searching for an answer this post was the #1 answer. Have a nice day.
 
Old 08-31-2012, 01:09 AM   #19
created4dev
LQ Newbie
 
Registered: Aug 2012
Posts: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by gbowden View Post
Does anyone know if there is a mv command which displays a progress bar, like wget?
use pv utility
 
Old 10-13-2012, 06:52 AM   #20
simobk
LQ Newbie
 
Registered: Oct 2012
Posts: 1

Rep: Reputation: Disabled
And I registered too just to say thanks to talavishay. It is sometimes useful to answer late when that post is in Google's top results.

FYI, this page is the 2nd result for search "linux mv progress"...

Thanks again!
 
Old 03-03-2013, 02:17 PM   #21
ronillon
LQ Newbie
 
Registered: Mar 2013
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by simobk View Post
And I registered too just to say thanks to talavishay. It is sometimes useful to answer late when that post is in Google's top results.

FYI, this page is the 2nd result for search "linux mv progress"...

Thanks again!
It made me to register too. Thanks talavishay. It is a workaround, but it worked for me.

For me it was #1 result in google search. I really see no harm posting in old threads. Time does not matter as long as the post contains relevant information, which is exactly the case here.

On the other hand, posts like this:
Quote:
Originally Posted by TB0ne View Post
Great....but this is a FOUR YEAR OLD THREAD, and the OP wasn't looking for info on rsync.
Lead only to bloating the topic with completely offtopic discussion. I don't say it wasn't usefull, because apparently at least 5 users registered just to leave a comment about it.
 
Old 03-04-2013, 03:06 AM   #22
bloodstreetboy
Member
 
Registered: May 2012
Posts: 195
Blog Entries: 3

Rep: Reputation: 37
Hey talavishay,
How did you do this? Creating Number of usernames with different registered date?
Are they all waiting for this day to post?
 
Old 03-05-2013, 04:44 AM   #23
jrave
LQ Newbie
 
Registered: Jan 2006
Posts: 2

Rep: Reputation: 0
You know.. I think he just decided to break the mold, and post a helpful answer on a help forum.
I know the internet seems to give all the assholes a voice they choose not to use face to face - hence posts like yours - but normal people can use it too.
So take something from this: A guy was helpful, a guy was thanked for being helpful. You might not feel the need to spend your time writing unhelpful posts on a help forum if you learn this lesson.
 
Old 03-05-2013, 05:06 AM   #24
bloodstreetboy
Member
 
Registered: May 2012
Posts: 195
Blog Entries: 3

Rep: Reputation: 37
I know you son of sl**s you all are same and I put leg on ur di** that's why you are out of control.
But if you can't respect senior member like TBOne then you all should f ur own ss.
You can't respect senior members.Now You are not going to be logged in one more time.
You all are same, I know.
No one can talk like this to senior members.
 
Old 03-05-2013, 09:05 AM   #25
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,473
Blog Entries: 4

Rep: Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525
Moderator Response

@jrave & @bloodstreetboy

Please re-read
Quote:
LQ Rules
  • Do not post any messages that are obscene, vulgar, sexually-orientated, hateful, threatening, or otherwise violative of any laws.
  • Personal attacks on others will not be tolerated.
  • Flame Wars will not be tolerated.
  • Do not post if you do not have anything constructive to say in the post.
Please tone your messages down, we do not need this type of post(s) here a LQ. LQ is a moderated forum, if you find an issue with posts then please report the post so we the moderators can correct the problem.
 
Old 05-15-2013, 09:51 AM   #26
rasmusscholer
LQ Newbie
 
Registered: May 2013
Posts: 1

Rep: Reputation: Disabled
Two comments:

First, in order to comply with the "LQ Rules", I have to add something constructive, so here goes: the --remove-sent-files switch seems to have been renamed to --remove-source-files, the rsync documentation does not have any mention of --remove-sent-files. However, the --remove-sent-files still work, and seems to be an alias for --remove-source-files.

Now that I have added something of value, allow me to add that I, as many, came here using google. This page is now the number one hit in google, so thank you talavishay for providing the only post in this thread with any real value---including the moderator's disheartening posts. Indeed, the linux community is notorious for strict enforcement of a particular dogma, a dogma often perceived as elitist by outsiders and newcomers. The Ubuntu movement has done well in eliminating this attitude in their associated fora, but unfortunately it persists in many other branches of the linux community. As evident, also at LQ. This state would be a shame for any community, intimidating newcomers and forcing people who are only trying to help away. And for the linux community in particular, a community that prides itself of being "Free and open", serving the good not evil, this is truly an embarrassment.
 
Old 05-15-2013, 02:32 PM   #27
rootaccess
Member
 
Registered: Mar 2012
Posts: 211

Rep: Reputation: Disabled
If I am moving 1 file and I'd like to see the progress of it, such as a 5GB file, I use dcfldd
dcfldd if=file of=wherever bs=2048 or 4096 or whatever
 
Old 05-15-2013, 10:14 PM   #28
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,473
Blog Entries: 4

Rep: Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525Reputation: 1525
Moderator Response

Quote:
Originally Posted by rasmusscholer View Post
Two comments:

First, in order to comply with the "LQ Rules", I have to add something constructive, so here goes: the --remove-sent-files switch seems to have been renamed to --remove-source-files, the rsync documentation does not have any mention of --remove-sent-files. However, the --remove-sent-files still work, and seems to be an alias for --remove-source-files.

Now that I have added something of value, allow me to add that I, as many, came here using google. This page is now the number one hit in google, so thank you talavishay for providing the only post in this thread with any real value---including the moderator's disheartening posts.
You are aware that LQ is a moderated forum. Nothing that was said to either jrave & bloodstreetboy was out of line. Members here agreed to abide by LQ Rules when signing up.

If you find an issue with a post or thread then feel free to use the <Report> facility or feel free to contact a moderator, myself included..
Quote:
Originally Posted by rasmusscholer View Post
Indeed, the linux community is notorious for strict enforcement of a particular dogma, a dogma often perceived as elitist by outsiders and newcomers. The Ubuntu movement has done well in eliminating this attitude in their associated fora, but unfortunately it persists in many other branches of the linux community. As evident, also at LQ. This state would be a shame for any community, intimidating newcomers and forcing people who are only trying to help away. And for the linux community in particular, a community that prides itself of being "Free and open", serving the good not evil, this is truly an embarrassment.
Personally, I feel LQ is a open moderated forum that helps the community. No one is intimidating new comers to LQ.

We do have rules that are enforced and everyone agreed to abide by LQ Rules when joining LQ. Dogma is not necessarily a bad thing but the true state or condition within a environment set by the participants for a community. Excerpt from LQ Rules;
Quote:
Registration to this forum is free! We do insist that you abide by the rules and policies

Last edited by onebuck; 05-15-2013 at 10:16 PM. Reason: typo
 
Old 08-14-2013, 05:42 AM   #29
plofkat
LQ Newbie
 
Registered: Sep 2011
Distribution: Debian Squeeze
Posts: 3

Rep: Reputation: Disabled
Quote:
Originally Posted by talavishay View Post
with a simple alias in your .bash_alias you'll get the same functionality your looking for..

alias rsynccopy="rsync --partial --progress --append --rsh=ssh -r -h "
alias rsyncmove="rsync --partial --progress --append --rsh=ssh -r -h --remove-sent-files"

obviously you can do it straight from the shell like this

user@server:/$ rsync --partial --progress --append --rsh=ssh -r -h --remove-sent-files SOURCE_FILE DESTINATION

OR ( with the alias )

user@server:/$ rsyncmove SOURCE_FILE DESTINATION

some versions of RSYNC use a different syntax..
check the "rsync --help" for more info ..
Thanks, this helped.
 
  


Reply

Tags
mv, progress, rsync


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
cp progress bar edwardsiow Linux - General 26 09-04-2011 09:53 AM
cp with progress bar? Rotwang Linux - General 5 04-27-2005 08:49 PM
Progress bar image craigs1987 Fedora 0 05-27-2004 03:31 PM
cp: progress bar chii-chan Linux - General 2 10-30-2003 07:30 PM
Progress Bar zael Programming 3 10-01-2003 01:20 PM


All times are GMT -5. The time now is 04:02 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration