Showing posts with label Unix. Show all posts
Showing posts with label Unix. Show all posts

Tuesday, October 9, 2007

Using reset command

Using reset command

After accidentally view a binary file in the command line, i.e., user@ubuntu:~# cat /path/some/file, and the prompt shows scrambled text like this:

You need to type reset to get correctly encoded command line. I haven't figure out how to reset from ssh session. So if you know how please let me know.

Wednesday, August 22, 2007

Using tar

Uncompressing files

tar xvf file.tar tar zxvf file.gz tar zxf file.tgz tar xjvf file.tar.bz2 gunzip -c file.tar.gz | tar xf - bunzip2 file.bz2
Options:
  • f means file
  • z means use zip/gzip
  • v means verbose
Compressing files
tar cvf /tmp/backup.tar /home/username
  • c means create file