terminal
Welcome to Linux Practice Terminal!
Type "help" to see available commands.
user@linux:~$
删除文件和目录
学习使用rm安全地删除文件和目录。
步骤 1
创建一个测试文件来练习删除。
输入:touch testfile.txt
touch testfile.txt
步骤 2
使用rm删除测试文件。
步骤 3
列出文件来验证文件已被删除。
步骤 4
创建一个包含文件的目录,然后递归删除它。试试:mkdir testdir && touch testdir/file.txt && rm -r testdir。