- Use 'cd –' to toggle between the last two directories:
- history 10
use Control-R to search the history (same as Emacs C-r, C-s). Press Left/Right arrow key to edit the command before executing.
C-p to display previous command (!! enter)
history –c, clear allcommand, this command will not show in history [this line updated on 10/23/09] - tar [options] [tar-archive-name] [other-file-name]:
[option c] stands for create an archive
[option v] stands for verbose mode, displays additional info while executing the command
[option f] indicates the archive file name mentioned in the command
[option t] display all the files from the tar archive
[option z] when dealing with tar.gz compressed file
[option j] when dealing with tar.bz2 compressed file - in ~/.bash_profile, separating them with :,
- list the files in the ascending/descending order of file size
# cd /tmp/data/calibration
# cd /root/usr/
# cd -
# pwd
/tmp/data/calibration
# cd -
# pwd
cd /root/usr/
tar cvf /tmp/myfile.tar /home/peter
tar tvf /tmp/myfile.tar
tar xvf /tmp/myfile.tar
tar cvfz /tmp/myfile.tar /home/peter
tar xvfz /tmp/myfile.tar
export CDPATH=/etc
export CDPATH=/var:/home:~:/home
ls -al | sort +4n
ls -al | sort +4nr
No comments:
Post a Comment