Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] The Mother of All (bash) Commands
- Date: Tue, 18 Mar 2008 09:30:07 +0100
- From: Attila Kinali <attila@example.com>
- Subject: Re: [tlug] The Mother of All (bash) Commands
- References: <op.t756gdbtp3esx5@mail.gol.com>
- Organization: SEELE
On Tue, 18 Mar 2008 01:51:39 +0900 "Greg Thomson " <gregt@example.com> wrote: > Here is a cool little bash one liner with explaination. > This may not interest bash gurus but it really illustrates the power of > the command line. > > laptop# ( cd / ; tar -zcvf - /home ) | ssh user@example.com 'cat > > laptop_backup_`date -I`.tar.gz' If you have a gnu tar, you can simply do tar -zcvf user@example.com:laptop_backup`date -I`.tar.gz /home Notes: 1) tar uses ssh to connect to a remote host, if it finds a colon in the archive file name. If this is undesired use --force-local 2) cd / isn't needed if the absolut path of /home is given 3) tar behaves differently if an absolute path or a relative path is given regarding hardlinks (if in doubt, use cd $path; tar <options> . ) 4) tar needs rmt on the remote machine which might be in a location tar doesn't expect it to be (it changed a few times in history), the hardly documented --rmt-command=<path-to-rmt> fixes this. Make sure to use the rmt command that is compatible to your tar (eg rmt-tar) Attila Kinali -- Praised are the Fountains of Shelieth, the silver harp of the waters, But blest in my name forever this stream that stanched my thirst! -- Deed of Morred
- References:
- [tlug] The Mother of All (bash) Commands
- From: Greg Thomson
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] CAPTCHA on keitai
- Next by Date: Re: [tlug] Bashing away at Unix
- Previous by thread: Re: [tlug] The Mother of All (bash) Commands
- Next by thread: Re: [tlug] The Mother of All (bash) Commands
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links