Course: Linux Administration Bootcamp

Deleting, Renaming, Copying, and Mounting Files

This tutorial explains how users can delete, rename, copy and mount files.

How to Remove Files From Linux?

To remove files from Linux, two commands “$ rm” and “$ unlink” are available to perform this operation. You can also delete a particular file from any directory through these commands by providing a directory path.

How to Rename Files in Linux?

To rename any single or multiple files “$ mv” and “$ rename” commands are most useful.

How to Copy Files in Linux?

Linux users can create a copy of the files. To do so, check out the below-stated steps:

  • Open file targeted file and add some text.
  • Execute the “$ cp” command along with the existing and new names of the file.

Note: You can also copy one or multiple files simultaneously from one directory to another directory.

How to Mount Files in Linux?

Mounting is the process that attaches the files to a directory and makes them accessible to the system. Without mounting files, users are not allowed to logically access the data. To perform a mounting operation in your system let’s try out the provided instructions:

  • Check the available disk partitions.
  • Check the status of available partitions like active or not.
  • Create a directory.
  • Mount the directory by utilizing the “$ sudo mount” command with the directory name.

Note: You can unmount the directory whenever you need.

We have explained the procedure of deleting, renaming, copying, and mounting files through the command line. To perform these steps practically kindly check out the attached video.

About the author

Talha Saif Malik

Talha is a contributor at Linux Hint with a vision to bring value and do useful things for the world. He loves to read, write and speak about Linux, Data, Computers and Technology.