Open jbeadling opened 1 year ago
Below you will see I created a test directory with some dummy files to practice the cp, mv, and rm command. First I list out the files and copy file1 to my home directory. I create file5 in the home directory and copy it to the test directory. I then rename the file using mv command. The mv command is used to move and rename files. So I rename file5 to file6 and then move it to the test directory. I then use rm command to delete file1 and file2. I also tried the rmdir command which removes directories however it only removes empty directories and does not utilize the -rm flags. So I just used the rm -rf command to delete the whole directory with several files in it. This can be pretty dangerous and you want to exercise caution when using the -rf flags to delete stuff. You may accidentally delete something crucial.
Ticket: Copy, Move, and Delete Files Using
cp,
mv,
andrm.
Summary
Learn how to copy, move, and delete files and directories using the
cp,
mv,
andrm
commands in a Unix-like operating system.Description
Objective: Understand and practice the basic file operations—copying, moving, and deleting—using the
cp,
mv,
andrm
commands.Scope:
cp,
mv,
andrm.
Learning Tasks
Copy Files with
cp
:cp
command.Move Files with
mv
:mv
command moves files and directories.Delete Files with
rm
:rm
command for file and directory removal.Explore Options and Flags:
-r
for recursive operations or-f
for forcing actions.Best Practices and Warnings:
Troubleshooting:
Learning Goals
Priority