Remove a directory

2018-01-07  本文已影响1人  成江

To remove a directory that contains other files or directories, use the following command.

rm -r mydir
// or we can use this command
rmdir mydir

Executing the above command would delete all files and directories within the directory named in the command. However, it would also present a prompt for approval to delete each of the files. If you don't want to receive a prompt for each file, use the following command instead.

rm -rf mydir
上一篇 下一篇

猜你喜欢

热点阅读