Logo ← PostgreSQL Blog

Gear up at linux


Fundamental operations used in a Unix-based system

File and Directory Operations:

  • ls: Lists directory contents.
  • cd: Changes directory.
  • pwd: Prints working directory.
  • mkdir: Creates a new directory.
  • rmdir: Removes an empty directory.
  • rm: Removes files or directories.
  • nano: Opens a text editor to create or modify files.
  • touch: Creates or updates the timestamp of a file.
  • cat: Displays file contents.

File Manipulation:

  • cp: Copies files or directories.
  • mv: Moves or renames files or directories.
  • file: Gets information about file types.

System Information:

  • df: Shows disk space usage.
  • du: Shows directory space usage.

Text Processing:

  • grep: Searches for patterns in files.
  • cut: Extracts sections from each line of files.
  • uniq: Filters or removes duplicate lines.

Sorting and Filtering:

  • sort: Sorts lines of text files.
  • awk: Processes and analyzes text files.

Network Tools:

  • nmap: Scans for open ports on a network.

User Permissions:

  • chmod: Changes file permissions.
  • chown: Changes file ownership.