I have been using the CLi a bit more these days. So I decided to clean up my home folder which is where I save a lot of work and other things like Linux Distros. So I used a trio of commands to sort it out.
- rm: The rm command removes files from almost any folder. The trick is that if you want to delete the folder you have to use -rf after the command rm to get rid of the folder. That only works when the folder or files in question are under your own permissions… ie if they are roots or another users files or folders you have to use sudo in front and then they are gone. There must be other variables with this command, but that is all that I have used this command for.
- cp: The cp command that most of Linux and Unix users know helps copy files and folders to another folder. To use this command you need to type in the file that you are going to copy and next to that file or folder you need to put in another folder which comes after to be where the file is copied. It is very easy once you get to know what you are doing.
- mv: The mv command is the move command. If you do not want to copy or delete the file then you just need to move it to somewhere you want to have it. All you have to do with this is type mv fileorfolderthatyouwanttomove folderwhereyouwanttomovethatfileorfolder . Thats it!
Thanks for reading,
Ryan Orser.