This shows you the differences between the selected revision and the current version of the page.
| linux:bash_tricks 2008/10/27 18:41 | linux:bash_tricks 2008/10/31 19:05 current | ||
|---|---|---|---|
| Line 18: | Line 18: | ||
| ===== Backup with tar over ssh ===== | ===== Backup with tar over ssh ===== | ||
| <code>$ tar xzvf - /home/user/dir | ssh user@server "dd of="/dest/dir/file.tar.gz</code> | <code>$ tar xzvf - /home/user/dir | ssh user@server "dd of="/dest/dir/file.tar.gz</code> | ||
| + | \\ | ||
| + | |||
| + | ===== Get one script's current directory ===== | ||
| + | <code>scriptdir=$(cd $(dirname $0); pwd -P)</code> | ||