日期:2014-05-16 浏览次数:20911 次
bixiaopeng@bixiaopengtekiMacBook-Pro workspace$ touch 1.txt #1.删除一个文件,删除时会有提示 bixiaopeng@bixiaopengtekiMacBook-Pro workspace$ rm -i 1.txt remove 1.txt? y bixiaopeng@bixiaopengtekiMacBook-Pro workspace$ touch 1.txt #2.强制删除一个文件,不管文件在不在 bixiaopeng@bixiaopengtekiMacBook-Pro workspace$ rm -f 1.txt bixiaopeng@bixiaopengtekiMacBook-Pro workspace$ ls -al | grep 1.txt bixiaopeng@bixiaopengtekiMacBook-Pro workspace$ mkdir dir1 #3.删除一个目录 bixiaopeng@bixiaopengtekiMacBook-Pro workspace$ rm -r dir1 bixiaopeng@bixiaopengtekiMacBook-Pro workspace$ mkdir dir1 #4.删除一个目录,删除时会有提示 bixiaopeng@bixiaopengtekiMacBook-Pro workspace$ rm -ri dir1 examine files in directory dir1? y remove dir1? y bixiaopeng@bixiaopengtekiMacBook-Pro workspace$ ls -al |grep dir1
bixiaopeng@bixiaopengtekiMacBook-Pro workspace$ mkdir dir2 bixiaopeng@bixiaopengtekiMacBook-Pro workspace$ cd dir2 bixiaopeng@bixiaopengtekiMacBook-Pro dir2$ mkdir dir3 bixiaopeng@bixiaopengtekiMacBook-Pro dir2$ cd dir3 bixiaopeng@bixiaopengtekiMacBook-Pro dir3$ touch f1 #建一个空目录 bixiaopeng@bixiaopengtekiMacBoo