********************* Common shell Commands ********************* .. role:: underline :class: underline .. code-block:: powershell $ cd .. Basic structure of a shell command ================================== Using autocomplete and the history ================================== .. list-table:: :header-rows: 1 :widths: 15 10 20 55 * - command - options - arguments - * - **pwd** - - - :underline:`P`\ rint :underline:`w`\ orking :underline:`d`\ irectory * - **cd** - - /path/to/folder/ - :underline:`C`\ hange :underline:`d`\ irectory - change the current working directory to a specific Folder * - **ls** - -ahl - /path/to/folder/ - :underline:`L`\ i\ :underline:`s`\ t information about files. |br| -a Do not hide entries starting with a dot |br| -h Print sizes in human readable format |br| -l Use a long listing format * - **python** - - /path/to/script.py - Run a python 2.x or 3.x script [#f1]_ * - **python3** - - /path/to/script.py - Run a python 3.x script * - **⇥** - - - Autocomplete command (tab-key) * - **Ctrl-P**, **↑** - - - Show the :underline:`p`\ revious command (control-P or arrow-up key) * - **Crtl-N**, **↓** - - - Show the :underline:`n`\ ext command (control-N or arrow-down key) * - **Ctrl-R** - - - Search for a previous command (control-R) * - **history** - - - Show the previous commands as a numbered list * - **!** - - - Execute a command from the numbered list of previous commands * - **mkdir** - - - * - **open** - - - * - **rm** - - - * - **mv** - - - * - **ssh** - - - * - **sudo rapsi-config** - - - .. rubric:: Footnotes .. [#f1] Depends on how python was configured when it was installed. https://www.digitalocean.com/community/tutorials/how-to-use-bash-history-commands-and-expansions-on-a-linux-vps .. list-table:: :header-rows: 1 :widths: 10 10 20 60 * - command - options - arguments - * - **touch** - -r - file1 file2 - Change file access and modification times |br| -r Set access and modifications from file1 -> file2 Common options and arguments ============================ .. code-block:: bash # Show version information -V --version # Show available options and arguments -h --help # Format and display the on-line manual pages # NOTE: Press 'q' to exit the manual man Fundamentals ============ .. code-block:: bash # -c Create a new archive containing the specified items # -f Specify the filename of the archive # -v Verbose output # -z Use zip/gzip for compression tar -cfvz archive_name.tar.gz filename1 filename2 directory1 # -x Extract the contents from a tar file tar -xfvz archive_name.tar.gz