Rate this page del.icio.us  Digg slashdot StumbleUpon

Tips from an RHCE

by the editorial team


Use tar to create a backup on a remote server via ssh (you won’t need local drive space to make the file first):

tar cf user@station1.example.com:/tmp/mybackup.tar 
/path/to/myfiles --rsh-command=/usr/bin/ssh

Stop the screen from clearing when you quit a man page:

echo 'export MANPAGER="/usr/bin/less -iRsX"' >> ~/.bash_profile

Use lftp for sftp to any host running sshd (it is much better!):

lftp sftp://user@host.example.com

Tip contributed by Joshua M. Hoffman, RHCE/X Instructor II, Red Hat Global Learning Services

4 responses to “Tips from an RHCE”

  1. Olivier says:

    This value for MANPAGER is nice too :

    “col -b|vim -Rc ’se ft=man statusline=%=Line:\ %l/%L\ (%P)’ -c ‘nm ‘ -c ‘nm b ‘ -c ‘nm q :q\!’ -”

  2. pramod says:

    how to “start” configuring cluster in rhel 4 what are all the softwares required please explain in breif.

  3. Scott W says:

    Another, more generic, method for creating remote archives:

    tar cf - /path/to/myfiles | ssh user@station1.example.com “cd /tmp ; tar xf -”

  4. Laurent GAUTROT says:

    And if you don’t want to store paths:

    tar -C /path/to -cf - myfiles | ssh user@station1.example.com “tar -C /tmp -xf -”

Leave a reply