How To Use Rm and Rmdir to Remove Files and Folders In Terminal (Shell)
How To Use Rm and Rmdir to Remove Files and Folders In Terminal (Shell)
Through your command line interface, you can easily remove files and directories (folders) using simple commands.
To remove files and directories, access your CLI and enter the following command.
To remove a file, type rm followed by the name of the file.
E.g.: rm 'dummyfile.exe'
To remove a directory, type : rmdir 'music'
Replace 'dummyfile.exe' with the actual name of the file you wish to remove.
To make the command interactive so you get a prompt each time you attempt to remove a file, add an '-i' flag to the script.
E.g.: rm -i 'dummyfile.exe'
rmdir -i 'music'
Post a Comment