2014-01-29 41 views
0

我試圖使用Unix命令rmdir刪除一個目錄,但我不斷收到一條消息:什麼時候Unix命令rmdir適合使用?

pwd 
/Users/jona/Documents/Unix-Practice 
$ rmdir Unix-Practice 
rmdir: Unix-Practice: No such file or directory 

我也做這個,看看我需要上面的目錄被刪除:

$ cd .. 
$ pwd 
/Users/jona/Documents 
$ rmdir Unix-Practice 
rmdir: Unix-Practice: Directory not empty 

我使用的命令不正確嗎?

我從這個指南http://cli.learncodethehardway.org/book/ex7.html學習,它告訴我使用rmdir

回答

6

看來你的目錄包含一些文件,當目錄爲空,然後使用rmdir

From the man page of rmdir

  • 命令rmdir - 刪除空目錄
  • 刪除目錄(IES),如果他們是空的。

用途: rm -r Unix-Practice刪除與文件

目錄
相關問題