Practicing File Operations in the Terminal
Today, I successfully practised different file operations using the Ubuntu terminal.
I learned how to copy, move, and delete files and directories using the cp, mv, and rm commands.
1. Copying a Directory (cp)
I used cp -r Documents DocumentsCopy to copy a directory recursively. The -r flag allowed me to copy the directory along with all its contents.
2. Moving a File (mv)
I used mv file1.txt Backup/ to move a text file into another directory. I learned that mv transfers a file to a new location without leaving the original behind.
3. Deleting a Directory (rm)
I used rm -r DocumentsCopy to delete a directory and everything inside it. I learned that the -r flag makes recursive deletion possible.
What I Learned
Through this practical exercise, I learned the differences between these three important Linux commands:
cp copies files and directories while preserving the originals.
mv moves or renames files and directories.
rm permanently removes files and directories.
I also learned the importance of being careful when using rm -r because deleting the wrong directory can result in permanent data loss.
This practical exercise has improved my understanding of file management in Linux and strengthened my confidence in using the Ubuntu terminal.
#AiCECommunity #Ubuntu #Linux #SoftwareEngineering