Lâu lâu review tí lệnh Linux

Hiển thị 10 dòng đầu tiên của file
head -10 ~./bash_profile

Hiển thị 10 dòng cuối của file
head -10 ~./bash_profile

Bài toán cho bạn: :p
Kết hợp head, tail hiển thị dòng thứ n của một file ;))
Kết hợp head, tail hiển thị L(limit) dòng từ dòng thứ O(offset) của một file ;))

alias xxx=’echo “I love you”‘
xxx

vim ~/.bash_profile
Thêm dòng
alias seelog=’tail -f /var/log/message’
Để alias có hiệu lực luôn
source ~/.bash_profile
Giờ thì gõ
seelog

vim
:x = :wq (lưu và thoát)
:10 (nhảy tới dòng số 10)