Here are some common Linux commands:

  1. ls - used to list the contents of a directory
  2. cd - used to change the current working directory
  3. mv - used to move or rename files and directories
  4. mkdir - used to create a new directory
  5. rm - used to delete files and directories
  6. chmod - used to change the permissions of a file or directory
  7. sudo - used to execute a command with superuser privileges
  8. apt-get - used to install and manage software packages on Linux systems
  9. grep - used to search for text patterns in files
  10. man - used to display the manual pages for a command

These are just a few examples - there are many more Linux commands that can be used for various tasks.

More commands

The cp command is used to copy files and directories in Linux. It has the following syntax:

cp [OPTION]... SOURCE DEST

cp [OPTION]… SOURCE DEST

Where SOURCE is the file or directory you want to copy, and DEST is the destination where you want the copy to be placed.

For example, to copy a file named file1.txt to a directory named /tmp, you would use the following command: cp file1.txt /tmp The cp command also has many options that can be used to modify its behavior. For example, the -r option can be used to copy directories recursively, and the -p option can be used to preserve the original file’s permissions, ownership, and timestamps.

rsync

rsync -avz /src /dest The rsync command also has many options that can be used to modify its behavior. For example, the -a option can be used to preserve the original file’s permissions, ownership, and timestamps, and the -z option can be used to compress the data during transfer.

    <h2>Rsync</h2>
    <code>rsync -avz foo:src/bar /data/tmp</code>
</li>
<li>
    <h2>Slette mappe og filer</h2>
    Delete All Files and Folders Including Subdirectories

    <code>rm -rf /path/to/dir</code>
</li>

filter programs based on listening port

lsof -i :8000 filter application that are listening on port 8000.

how to find the Process ID (PID) that are running

ps ax | grep firefox

search in files in a folder

grep -rni “word” *

source: https://www.tutorialspoint.com/how-to-perform-grep-operation-on-all-files-in-a-directory

Working progress