Hack 21. Change the Case Using tr Command Hack 21. Change the Case Using tr Command by Ramesh Convert a file to all upper-case using tr command as shown below. $ cat emplo...
Hack 49. Combine gzip, bzip2 with tar How to use gzip with tar? How to use bzip2 with tar? Hack 49. Combine gzip, bzip2 with tar by Ramesh How to use gzip with tar? Add...
给压缩包加个锁 给压缩包加个锁 我们知道RAR 可以添加密码, 其实, ZIP 也可以的. 命令: zip - P mysecurepwd var - log - protected . zip / var / log /* 如果你觉得这样明文记录密码不好的话, 还可以交互式的输入密码: zip - e var - log ...
Hack 34. Display username, hostname and basename of directory in the prompt Hack 34. Display username, hostname and basename of directory in the prompt by Ramesh The PS1 in...
Hack 9. Display Current Date and Time in a Specific Format Hack 9. Display Current Date and Time in a Specific Format by Ramesh Following are different ways of displaying t...
Hack 8. Set Hardware Date and Time Using hwclock Hack 8. Set Hardware Date and Time Using hwclock by Ramesh Before setting the hardware date and time, make sure the OS date...
Hack 88. Read data file fields inside a shell script Hack 88. Read data file fields inside a shell script by Ramesh This example shows how to read a particular field from a...