- 博客(7)
- 收藏
- 关注
linux 101 hacks 7 (Command Line History)
1:HISTTIMEFORMAT command:在命令行里面显示 定义了HISTTIMEFORMAT 的话 , 在使用history命令时就会显示制定格式的执行命令的时间export HISTTIMEFORMAT=’%F %T ‘ %F 年月日 %T 时分秒history n 显示最近 n个命令在命令行里面 按 ctrl+R 会显示 reverse-i-search 的...
2009-04-09 12:16:27
85
linux 101 hacks 5 (Archive and Compression)
1:zip command语法: zip {.zip file-name} {file-names}-r zip一个目录-{1..9} 1:fast 9:best default : 6-P pwd 密码 (会显示 密码)-e pwd(密码不会回显)-t 验证一个zip文件2:unzip-v 察看解压详细过程-l 之查看其内容 而不解压3...
2009-04-07 14:33:13
76
linux 101 hacks 6 (PROMPT_COMMAND)
1:PS1 - Default Interaction Promptexport PS1="\u@\h \w> " \u用户名,\h 主机名 \w 当前路径 , 如在home目录下,则显示~\t 时间 , \@ 12小时形式的时间 $kernel_version kernel 版本号,2:PS2 - Continuation Interactive Prompt命令太长了,你要...
2009-04-03 13:37:25
81
linux 101 hacks 4 (Essential Linux Commands)
1:grep command# grep search_word filename-v 不显示符合的行-c 出现的次数-r 在文件夹里面找-i 忽略大小写-l 显示符合条件的 文件名2:find commandfind path -name filename 以文件名查找-type-size (+100m:大于100m的)-mtime (+60)...
2009-04-03 00:17:09
85
linux 101 hacks 3 (ssh)
1:查看ssh版本ssh -VOpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003 这个为 openSShssh: SSH Secure Shell 3.2.9.1 (non-commercial version)... 这个为ssh22:用username 登陆 hostname 上 ssh -l username hostname...
2009-04-01 15:01:52
81
linux 101 hacks 2
日期操作:1:设置日期date {mmddhhmiyyyy.ss} mm – Month dd – Date hh – 24 hour format mi – Minutes yyyy – Year ss – seconds如:# date 013122192009.53也可以用以下的形式:# date +%Y%m%d -s "20090131"# ...
2009-04-01 13:50:13
95
linux 101 hacks 1
巧用cd命令:1:用 CDPATH 来定义你的cd 命令的 根目录 例:如现在不再/etc下 export CDPATH=/etc cd mail 将会进入到 /etc/mail 目录下这样我们就可以在我们自己的home 目录下的.bash_profile文件里 加上 export CDPATH=path,这样我们就可以把自己一个常用的目录定为我们的cd的起始目录2...
2009-04-01 00:44:55
69
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人