Practicing file operations in the terminal
The command cp is for copy from GUI to the terminal, you copy from terminal to GUI too by used of command cp space-r space anything eg folder
For mv which means move ,you can move your file from GUI to terminal.
Mv is working for both files and directory.
rm is only to delete a file.
The command is rm space new folderOpen PDF
File Operations & Command Reference AiCE Software Engineering Foundations — The Developer Environment You can now find your way around, create folders and files, and read what's in them. This final Lesson in the set covers the commands that move things, duplicate things, and — permanently — remove things: cp, rm, mv, and clear. It closes with a full reference table of every command covered across this unit. 1. Copying Files and Directories: cp To copy a file from one location to another, use the cp command: cp manifesto.txt AfricaTechHub/ This copies manifesto.txt into the AfricaTechHub directory. The original file stays exactly where it was — cp duplicates, it does not move. Trying to copy a directory with plain cp will fail with an error. To copy a directory — and everything inside it — you need the -r flag, which stands for recursive: cp -r AfricaTechHub BackupHub This creates a complete copy of AfricaTechHub, including all its contents, under the new name BackupHub. The -r flag tells cp to step inside the directory and copy everything it finds there, one level after another. Command Purpose Works On cp file.txt destination/ Copy a file Files only cp -r folder/ destination/ Copy a directory Directories only 2. Deleting Files and Directories: rm To delete a file, use the rm command: © Adesina Olagunju | African Institute for Computing Excellence | 1 rm welcome.txt The file is deleted immediately — there is no confirmation dialog and no trash can to recover it from. Unlike a graphical interface, where deleted files typically go to a Recycle Bin first, anything removed with rm in the terminal is gone for good. Warning — rm Is Permanent Before running rm, double-check that you are deleting the right file. There is no recovery. Many experienced developers make a habit of running ls first to confirm exactly what's there before they run rm. Treat this command with real caution. Directories cannot be deleted with plain rm either — they require the -r flag: rm -r BackupHub This deletes the directory along with every file and subdirectory inside it. Double-check before pressing Enter. Command Target Can It Be Undone? rm filename.txt A single file No rm -r directory name.A directory and all contents No 3. Moving and Renaming: mv The mv command moves a file or directory from one location to another. Unlike cp, the original disappears from its source location once the move completes: mv manifesto.txt any name you want.After this command, manifesto.txt no longer exists in its original location

