0/1 Lessons

Introduction to Linux Server Operating Systems

• 30min

0 / 3 lessons complete

Linux Server Installation and Lab Setup

• 23min

0 / 6 lessons complete

Working with the Linux Command Line Interface

• 1hr 30min

0 / 12 lessons complete

User and Group Management

• 44min

0 / 7 lessons complete

Linux Storage

• 30min

0 / 6 lessons complete

Linux Administration Basics

• 53min

0 / 8 lessons complete

Linux Networking

• 47min

0 / 8 lessons complete

Course Conclusion

• 5min

0 / 1 lessons complete

Creating and Deleting Files


Q&A (0)

Notes (0)

Resources (0)

Saving Progress...


There are no resources for this lesson.

Notes can be saved and accessed anywhere in the course. They also double as bookmarks so you can quickly review important lesson material.

Create note

In this lesson, you will learn how to manipulate files on a Linux/Unix system. We will cover essential commands for creating, reading, and modifying files.

Creating Files

touch (Create Empty File)

The touch command is used to create empty files. If the file already exists, it updates the file's modification timestamp.

touch filename.txt

mv (Move/Rename Files)

The mv command is used to move or rename files and directories. It can be used to change the location or name of a file.

mv oldfile.txt newfile.txt  # Renames a file
mv file.txt /path/to/directory  # Moves a file

cp (Copy Files)

The cp command is used to copy files and directories. It creates a duplicate of the source file in the specified location.

cp sourcefile.txt destination/

rm (Remove Files)

The rm command is used to remove files and directories. Be cautious when using it, as deleted files are not recoverable by default.

rm file.txt

echo (Write to File)

The echo command is used to write text to a file. It can be used to create or append text to a file.

echo "test" > test.txt  # Create a file with "test" content
echo "more text" >> test.txt  # Append text to an existing file

we covered:

  1. touch: Create or update empty files.
  2. mv: Move or rename files and directories.
  3. cp: Copy files and directories.
  4. rm: Remove files (and directories with -r).
  5. echo: Write or append text to a file.

See you in the next lesson!

Server Academy Members Only

Sorry, this lesson is only available to Server Academy Full Access members. Become a Full-Access Member now and you’ll get instant access to all of our courses.

0 0 votes
Lesson Rating
Notify of
profile avatar
Inline Feedbacks
View all comments