Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
verbose copy
- X-seq: zsh-users 11309
- From: Atom Smasher <atom@xxxxxxxxxxx>
- To: WNC Linux User's Group <wnclug@xxxxxxxxxx>, Clan of the Stout Monkey <stout@xxxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Subject: verbose copy
- Date: Sun, 18 Mar 2007 02:22:04 -0400 (EDT)
- Cc: phil@xxxxxxxxxxxxxx, Matthew Riben <matter@xxxxxxxxxxxxxxxxx>, Ed Moyle <ed@xxxxxxxxxxxxxxxxx>, jono@xxxxxxxxxxxxxx, Truman Boyes <truman@xxxxxxxxxxxxxx>, cyrus@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Openpgp: id=0xB88D52E4D9F57808; algo=1 (RSA); size=4096; url=http://atom.smasher.org/pgp.txt
i've seen this tossed around on a few command line oriented mailing lists,
but i've never never seen a ~good~ solution for a verbose copy...
something that will show the status of files *while* being copied.
i wanted to see the progress of a >700MB file being copied to a flash
drive, and figured it out.
here it... this is a single line alias in my .zshrc file:
alias cpv="rsync -poghb --backup-dir=/tmp/rsync -e /dev/null --progress --"
of course it requires rsync to be installed.
this works in zsh, and should work in all derivatives of the bourne
shells. some shells (csh and derivatives) may need the syntax changed to
assign an alias.
i now have a "cpv" command that acts as a verbose copy, and it properly
handles globs.
the options that i used, tweak as needed...
-p - preserve permissions
-o - preserve owner
-g - preserve group
-h - output in human-readable format
--progress - display progress
-b - instead of just overwriting an existing file, save the original
--backup-dir=/tmp/rsync - move backup copies to "/tmp/rsync"
-e /dev/null - only work on local files
-- - everything after this is an argument, even if it looks like an option
--
...atom
________________________
http://atom.smasher.org/
762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
-------------------------------------------------
"Anyone who has the power to make you believe absurdities
has the power to make you commit injustices."
-- Voltaire
Messages sorted by:
Reverse Date,
Date,
Thread,
Author