![]() Or try to track down the processes which are using the file. The syntax for the mv command is as follows: mv OPTIONS SOURCE DESTINATION The SOURCE can be one, or more files or directories, and DESTINATION can be a single file or directory. Device or resource busy You can't delete a file which is in use. How to Use the mv Command The mv command (short from move) is used to rename and move and files and directories from one location to another. ![]() Press Tab to ask the shell to auto-complete the filename for you. ![]() No such file or directory If this happens when trying to delete a file with a long name, it was probably displayed in truncated format. Or just start typing the name and hit Tab and the shell will do this for you.įor a filename which begins with a dash (-) you also need to precede the name with. Removing troublesome files Files with spaces or odd characters Put single quotes round the filename to hide the space from the shell, you could escape the space with \ if you prefer. rm -f will forcibly delete files without asking this is mostly useful if you have rm aliased to ``rm -i'' but want to delete lots of files without confirming each one.rm -r will recursively delete a directory and all its contents (normally rm will not delete directories, while rmdir will only delete empty directories).Consider using rm -I instead, which will only ask once and only if you are trying to delete three or more files. ![]() Some people will have rm aliased to do this automatically (type "alias" to check). ![]() rm -i will ask before deleting each file. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |