Menu

🌐 Linux Free Masterclass (Episode 8): Basic Commands (cp, mv, and rm)
πŸ“°

🌐 Linux Free Masterclass (Episode 8): Basic Commands (cp, mv, and rm)

DEV Community: cybersecurityΒ·Yashpal PatelΒ·10 days ago
#9nSB8nqT
#devtocybersecurity#devto#dev#terminal#basiccommands
Reading 0:00
15s threshold

🌐 Linux Free Masterclass (Episode 8): Basic Commands (cp, mv, and rm)

How do you copy, move, rename, and permanently delete files and directories directly from the terminal without using a mouse? Through powerful file management commands.

Here are the key points from Episode 8:

πŸ”Ή 1. The cp Command (Copying Files and Folders)

Purpose: Creates an exact duplicate of a file or directory.

Usage: Typing cp notes.txt backup.txt creates a backup copy of your file.

Recursive Copy: To copy an entire folder along with all its internal contents, use the -r flag (e.g., cp -r folder1 folder2).

πŸ”Ή 2. The mv Command (Moving and Renaming)

Purpose: A dual-purpose command used for both relocation and renaming.

Moving: Shifts a file from one path to another (e.g., mv notes.txt /home/user/Documents/).

Renaming: If the destination path is the same but with a new name, mv instantly renames the file (e.g., mv oldname.txt newname.txt).

πŸ”Ή 3.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.