文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>linux 学习笔记 : 文件操作

linux 学习笔记 : 文件操作

时间:2007-04-12  来源:_Sa

退出shell : ctrl + d, exit

关机 : shutdown

man man
man ls
man strcpy
man sleep

date

who
who am i
whoami

update

w

tty    //当前终端的设备文件名

passwd
passwd + someone (root only),(ctrl + d to stop)

write + someone

mesg n
mesg y
mesg

wall

telnet + IP (ctrl + ]) , (close)

ftp + IP
ftp> get src.tar.z
ftp> put main
ftp> ascii //(+CR 回车)
ftp> binary    //(only LF 换行)
ftp> hash
ftp> bye

cal
cal 2008
cal 8 1984

bc
scale = ( NUMBER )
bc -l    //(scale = 20)

more hello.java
more *.java
ls -l | more
pg hello.java

cat hello.java
cat hello.java world.java > t.txt

od hello.java
od -x hello.java
echo abcdefg | od -x    //(输出abcdefg的ASCII码)

head hello.java    //( -10 )
head -15 hello.java
tail -15 hello.java
netstat -s -p tcp | head -5
tail -f callThis.java

wc hello.java
pc -ef | wc -l
who | wc -l

sort hello.java>hello.sorted
ls -s | sort | tail -10

tee helle.java

sudo tar zxvf    (z 用gzip解压 ; x 解包 ; v 详细信息 ; f 解压的是文件)

正则表达式的特殊字符 : .  *  [  \  ^  $
$在表达式尾部表示特殊意义
^在表达式头部表示特殊意义
123$匹配行尾的123
.$匹配行尾的任意字符

grep class hello.java
egrep
fgrep    //fast-
-n        //显示行号
-i        //忽略大小写

date | awk '{print $4}'
awk -f std.awk hello.java

tail -f hello.java | sed 's/hello/hi/g'

cat hello.java | tr '[a-z]' '[A-Z]'

cmp f1.c f2.c
diff f1.c f2.c        //(-b忽略结尾空格)

vi hello.java
view hello.java
相关阅读 更多 +
排行榜 更多 +
奇境小镇MOD作弊菜单

奇境小镇MOD作弊菜单

角色扮演 下载
黑暗荒野2无限金币版

黑暗荒野2无限金币版

角色扮演 下载
骑战烈火之剑作弊菜单版

骑战烈火之剑作弊菜单版

角色扮演 下载