Linux Basics
Useful Find command reference
When capturing flags use the following for searching of specific files:
Base64 Encode & Decode
wget
curl
Fileless Downloads
SSH
Option | Description |
---|---|
| Hereby, we define the type of the searched object. In this case, ' |
| With ' |
| This option filters all files whose owner is the root user. |
| We can then filter all the located files and specify that we only want to see the files that are larger than 20 KiB. |
| With this option, we set the date. Only files newer than the specified date will be presented. |
| This option executes the specified command, using the curly brackets as placeholders for each result. The backslash escapes the next character from being interpreted by the shell because otherwise, the semicolon would terminate the command and not reach the redirection. |
| This is a |
Practical example using multiple options to filter the search:
Path | Description |
---|---|
| The top-level directory is the root filesystem and contains all of the files required to boot the operating system before other filesystems are mounted as well as the files required to boot the other filesystems. After boot, all of the other filesystems are mounted at standard mount points as subdirectories of the root. |
| Contains essential command binaries. |
| Consists of the static bootloader, kernel executable, and files required to boot the Linux OS. |
| Contains device files to facilitate access to every hardware device attached to the system. |
| Local system configuration files. Configuration files for installed applications may be saved here as well. |
| Each user on the system has a subdirectory here for storage. |
| Shared library files that are required for system boot. |
| External removable media devices such as USB drives are mounted here. |
| Temporary mount point for regular filesystems. |
| Optional files such as third-party tools can be saved here. |
| The home directory for the root user. |
| This directory contains executables used for system administration (binary system files). |
| The operating system and many programs use this directory to store temporary files. This directory is generally cleared upon system boot and may be deleted at other times without any warning. |
| Contains executables, libraries, man files, etc. |
| This directory contains variable data files such as log files, email in-boxes, web application related files, cron files, and more. |
Command | Description |
---|---|
Command | Description |
| Opens man pages for the specified tool. |
| Prints the help page of the tool. |
| Searches through man pages' descriptions for instances of a given keyword. |
| Concatenate and print files. |
| Displays current username. |
| Returns users identity. |
| Sets or prints the name of the current host system. |
| Prints operating system name. |
| Returns working directory name. |
| The |
| Ip is a utility to show or manipulate routing, network devices, interfaces, and tunnels. |
| Shows network status. |
| Another utility to investigate sockets. |
| Shows process status. |
| Displays who is logged in. |
| Prints environment or sets and executes a command. |
| Lists block devices. |
| Lists USB devices. |
| Lists opened files. |
| Lists PCI devices. |
| Execute command as a different user. |
| The |
| Creates a new user or update default new user information. |
| Deletes a user account and related files. |
| Modifies a user account. |
| Adds a group to the system. |
| Removes a group from the system. |
| Changes user password. |
| Install, remove and configure Debian-based packages. |
| High-level package management command-line utility. |
| Alternative to |
| Install, remove and configure snap packages. |
| Standard package manager for Ruby. |
| Standard package manager for Python. |
| Revision control system command-line utility. |
| Command-line based service and systemd control manager. |
| Prints a snapshot of the current processes. |
| Query the systemd journal. |
| Sends a signal to a process. |
| Puts a process into background. |
| Lists all processes that are running in the background. |
| Puts a process into the foreground. |
| Command-line utility to transfer data from or to a server. |
| An alternative to |
| Starts a Python3 web server on TCP port 8000. |
| Lists directory contents. |
| Changes the directory. |
| Clears the terminal. |
| Creates an empty file. |
| Creates a directory. |
| Lists the contents of a directory recursively. |
| Move or rename files or directories. |
| Copy files or directories. |
| Terminal based text editor. |
| Returns the path to a file or link. |
| Searches for files in a directory hierarchy. |
| Updates the locale database for existing contents on the system. |
| Uses the locale database to find contents on the system. |
| Pager that is used to read STDOUT or files. |
| An alternative to |
| Prints the first ten lines of STDOUT or a file. |
| Prints the last ten lines of STDOUT or a file. |
| Sorts the contents of STDOUT or a file. |
| Searches for specific results that contain given patterns. |
| Removes sections from each line of files. |
| Replaces certain characters. |
| Command-line based utility that formats its input into multiple columns. |
| Pattern scanning and processing language. |
| A stream editor for filtering and transforming text. |
| Prints newline, word, and byte counts for a given input. |
| Changes permission of a file or directory. |
| Changes the owner and group of a file or directory. |
Last updated