File Management in Linux (original) (raw)

Last Updated : 1 Jun, 2026

File management in Linux involves handling files and directories through various operations such as creation, modification, organization and access control within the filesystem.

Linux categorizes files into three main types, each serving a specific purpose in the system:

types_of_files_in_linux

1. General Files

These are the most common file types that store user data such as text files, images, and binaries.

2. Directories:

These act as containers that organize files and other directories hierarchically.

Important directories include:

3. Device Files:

These files represent hardware devices and handle input/output (I/O) operations.

common file management operations

1. Listing Files

$ls

ls-command-1

Running ls -l returns a detailed listing of files and directories in the current directory.

**Command:

$ls -l

**Output:

ls-command-2

Displays important information such as:

2. Creating Files

**Example:

touch filename

touch-command

3. Displaying File Contents

**Example:

cat filename

cat-command

4. Copying a File

**Syntax:

cp source/filename destination/

**Example:

cp source/filename destination/

copying-a-file-in-linux

5. Moving a File

**Example:

mv source/filename destination/

moving-a-file-in-linux

6. Renaming a File

mv filename new_filename

renaming-a-file-in-linux

7. Deleting a File

rm filename

image