LWM-Linux/06 - Linux File Operations/File Creation Deletion and Renaming.md

32 lines
1.2 KiB
Markdown

## Certainly! Let's explore file management tasks in **Linux Mint**. Here are some essential commands:
1. **Creating a File**:
- To create a new file, use the `touch` command followed by the desired filename:
```
touch sample.txt
```
2. **Copying Files**:
- The `cp` command copies a file. For example:
```
cp file.txt new-file.txt
```
3. **Moving or Renaming Files**:
- The `mv` command moves files from one location to another. It's also used for renaming files:
```
mv old-file.txt new-file.txt
```
4. **Removing Files**:
- To delete a file, use the `rm` command:
```
rm unwanted-file.txt
```
Remember, these commands empower you to manage files efficiently! Feel free to ask if you need further assistance. 😊🚀
Source: Conversation with Copilot, 7/12/2024
- [(1) How to create, copy, move, and remove files and directories in Linux.](https://www.thegeeksearch.com/how-to-create-copy-move-and-remove-files-and-directories-in-linux/.)
- [(2) How to Create, Delete, & Rename a File in Linux - Hivelocity.](https://www.hivelocity.net/kb/how-to-create-delete-rename-a-file-in-linux/.)
- [(3) Linux Mint - Community.](https://community.linuxmint.com/tutorial/view/1162.)