├── assets ├── chmodpic1.png ├── chmodpic3.png ├── chmodcommand.png ├── chmodcommands2.png └── private-rico.gif ├── commands ├── README.md ├── sleep │ └── README.md ├── whatis │ └── README.md ├── grep │ └── README.md ├── netcat │ └── README.md ├── clear │ └── README.md ├── nautilus │ └── README.md ├── df │ └── README.md ├── mv │ └── README.md ├── ps │ └── README.md ├── whoami │ └── README.md ├── exit │ └── README.md ├── which │ └── README.md ├── paste │ └── README.md ├── info │ └── README.md ├── ifconfig │ └── README.md ├── lsub │ └── README.md ├── tac │ └── README.md ├── dpkg-deb │ └── README.md ├── rename │ └── README.md ├── cd │ └── README.md ├── du ├── htop │ └── README.md ├── head │ └── README.md ├── wget │ └── README.md ├── lprm │ └── README.md ├── od │ └── README.md ├── tail │ └── README.md ├── top │ └── README.md ├── lpq │ └── README.md ├── xdg-open │ └── README.md ├── shutdown │ └── README.md ├── diff │ └── README.md ├── sudo │ └── README.md ├── pwd │ └── README.md ├── ss │ └── README.md ├── ncal │ └── README.md ├── wc │ └── README.md ├── fg │ └── README.md ├── shred │ └── README.md ├── useradd │ └── README.md ├── history │ └── README.md ├── rmdir │ └── README.md ├── mkdir │ └── README.md ├── lpr │ └── README.md ├── pstree │ └── README.md ├── su │ └── README.md ├── pidOf │ └── README.md ├── echo │ └── README.md ├── look │ └── README.md ├── find │ └── README.md ├── zip │ └── README.md ├── alias │ └── README.md ├── kill │ └── README.md ├── ip │ └── README.md ├── uname │ └── README.md ├── cut │ └── README.md ├── rm │ └── README.md ├── lpc │ └── README.md ├── touch │ └── README.md ├── passwd │ └── README.md ├── chown │ └── README.md ├── ls │ └── README.md ├── free │ └── README.md ├── curl │ └── README.md ├── netstat │ └── README.md ├── unzip │ └── README.md ├── cpio │ └── README.md ├── cat │ └── README.md ├── watch │ └── README.md ├── man │ └── README.md ├── whois │ └── README.md ├── chmod │ └── README.md ├── reboot │ └── README.md ├── traceroute │ └── README.md ├── host │ └── README.md ├── hostname │ └── README.md ├── whereis │ └── README.md ├── tar │ └── README.md ├── nslookup │ └── README.md └── ping │ └── README.md ├── CONTRIBUTING.md ├── LICENSE └── README.md /assets/chmodpic1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Walchand-Linux-Users-Group/Linux/HEAD/assets/chmodpic1.png -------------------------------------------------------------------------------- /assets/chmodpic3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Walchand-Linux-Users-Group/Linux/HEAD/assets/chmodpic3.png -------------------------------------------------------------------------------- /assets/chmodcommand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Walchand-Linux-Users-Group/Linux/HEAD/assets/chmodcommand.png -------------------------------------------------------------------------------- /assets/chmodcommands2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Walchand-Linux-Users-Group/Linux/HEAD/assets/chmodcommands2.png -------------------------------------------------------------------------------- /assets/private-rico.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Walchand-Linux-Users-Group/Linux/HEAD/assets/private-rico.gif -------------------------------------------------------------------------------- /commands/README.md: -------------------------------------------------------------------------------- 1 | # Commands 2 | ## This directory contains commands along with their usage, description, examples. In short a manual of the commands. 3 | -------------------------------------------------------------------------------- /commands/sleep/README.md: -------------------------------------------------------------------------------- 1 | # sleep 2 | delay for a specified amount of time 3 | sleep NUMBER[SUFFIX]... 4 | sleep OPTION 5 | --- 6 | 7 | ## Description 8 | Pause for NUMBER seconds. SUFFIX may be 's' for seconds (the default), 9 | 'm' for minutes, 'h' for hours or 'd' for days. NUMBER need not be an 10 | integer. Given two or more arguments, pause for the amount of time 11 | specified by the sum of their values 12 | 13 | --- 14 | 15 | ## Syntax 16 | ```bash 17 | sleep NUMBER[SUFFIX]... 18 | sleep OPTION 19 | ``` 20 | 21 | --- -------------------------------------------------------------------------------- /commands/whatis/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | 3 | whatis 4 | 5 | --- 6 | 7 | ## Description 8 | 9 | `whatis` searches a set of database files containing short descriptions of system commands for keywords and displays the result on the standard output. Only complete word matches are displayed. 10 | 11 | The whatis database is created using the command */usr/sbin/makewhatis*. 12 | 13 | --- 14 | 15 | ## Syntax 16 | 17 | ```bash 18 | $ whatis keyword ... 19 | ``` 20 | 21 | --- 22 | 23 | ## Author 24 | 25 | - John W. Eaton 26 | - Zeyd M. Ben-Halim 27 | - Andries Brouwer 28 | - Federico Lucifredi 29 | 30 | --- 31 | -------------------------------------------------------------------------------- /commands/grep/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | grep 3 | 4 | --- 5 | 6 | ## Description 7 | It is used to find particular string , grep filter searches a file for a particular pattern of characters. 8 | 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | grep [options] pattern [files] 14 | ``` 15 | 16 | --- 17 | 18 | ## Options/Flags 19 | - ### -c : This prints only a count of the lines that match a pattern 20 | ```bash 21 | $ grep -c "is" text.txt 22 | 23 | ``` 24 | - ### -n : Display the matched lines and their line numbers. 25 | ```bash 26 | $ grep -n "is" text.txt 27 | ``` 28 | . 29 | . 30 | . 31 | 32 | --- 33 | 34 | ## Author 35 | - Ken Thompson. 36 | 37 | --- 38 | -------------------------------------------------------------------------------- /commands/netcat/README.md: -------------------------------------------------------------------------------- 1 | # netcat 2 | Network Utility 3 | 4 | --- 5 | 6 | ## Description 7 | The Netcat (nc) command is a command-line utility for reading and writing data between two computer networks. The communication happens using either TCP or UDP. 8 | 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | nc [] 14 | ``` 15 | 16 | --- 17 | 18 | ## Options/Flags 19 | - ### -u = Use UDP connection. 20 | ```bash 21 | $ nc -u 22 | ``` 23 | - ### -l = Listen mode (default is client mode). 24 | ```bash 25 | $ nc -l 26 | ``` 27 | - ### -e = Program to execute after a connection has been established. 28 | ```bash 29 | $ nc -e 30 | ``` 31 | 32 | 33 | ## Author 34 | - Giovanni Giacobbi 35 | 36 | --- 37 | -------------------------------------------------------------------------------- /commands/clear/README.md: -------------------------------------------------------------------------------- 1 | # clear 2 | Clear the terminal screen. 3 | 4 | --- 5 | 6 | ## Description 7 | `clear` clears your terminal's screen including the terminal's scrollback buffer. 8 | 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | $ clear [options] 14 | ``` 15 | 16 | --- 17 | 18 | ## Options/Flags 19 | - ### -V: 20 | Reports the version of ncurses used in this program and exits. 21 | ```bash 22 | $ clear -V 23 | ``` 24 | - ### -x: 25 | Do not attempt to clear the terminal's scrollback buffer using the extended “E3” capability. 26 | ```bash 27 | $ clear -x 28 | ``` 29 | 30 | --- 31 | 32 | ## Exit Status 33 | - **0**: The command executed successfully. 34 | - **Non-zero:** = An error occurred. 35 | 36 | --- 37 | 38 | 39 | -------------------------------------------------------------------------------- /commands/nautilus/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | nautilus 3 | 4 | --- 5 | 6 | ## Description 7 | Nautilus is the official file manager for the GNOME desktop environment. 8 | The default file manager in Ubuntu is Nautilus. 9 | 10 | --- 11 | 12 | ## Syntax 13 | ```bash 14 | nautilus 15 | ``` 16 | 17 | --- 18 | 19 | ## Options/Flags 20 | - ### Opens the file manager with specific user privileges. 21 | ```bash 22 | $ nautilus 23 | ``` 24 | - ### Opens the file manager with root privileges. Helps us to file handling in root directories. 25 | ```bash 26 | $ sudo nautilus 27 | ``` 28 | - ### Opens the inserted path with root privileges. 29 | ```bash 30 | $ sudo nautilus path/of/directory 31 | ``` 32 | . 33 | . 34 | . 35 | 36 | --- 37 | -------------------------------------------------------------------------------- /commands/df/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | df 3 | 4 | --- 5 | 6 | ## Description 7 | The df command displays the amount of disk space available on the filesystem with each file name's argument. 8 | 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | df [OPTION]... [FILE]... 14 | ``` 15 | 16 | --- 17 | 18 | ## Options/Flags 19 | - ### -h = To run df in its human-readable format 20 | ```bash 21 | $ df -h 22 | ``` 23 | - ### -ih = To show inode (or index node) use on each mounted filesystem 24 | ```bash 25 | $ df -ih 26 | ``` 27 | 28 | . 29 | . 30 | . 31 | 32 | --- 33 | 34 | ## Exit Status 35 | - **x** = Meaning 36 | - **y** = Meaning 37 | --- 38 | 39 | ## Author 40 | - Torbjorn Granlund 41 | - David MacKenzie 42 | - Paul Eggert 43 | 44 | --- 45 | 46 | -------------------------------------------------------------------------------- /commands/mv/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | mv 3 | move files from source to directory 4 | --- 5 | 6 | ## Description 7 | Rename source to destination, or move source to directory 8 | 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | mv [OPTION]...[-T]SOURCE DEST 14 | mv [OPTION]...[-T]SOURCE... DIRECTORY 15 | mv [OPTION]...-t DIRECTORY SOURCE 16 | ``` 17 | 18 | --- 19 | 20 | ## Options/Flags 21 | - mv -b = make a backup of each existing file. 22 | ```bash 23 | $ mv -b a.txt b.txt 24 | ``` 25 | - mv -f = do not promt before overwriting. 26 | ```bash 27 | $ mv -f a.txt b.txt 28 | ``` 29 | - mv -n = do not overwrite an existing file. 30 | ```bash 31 | $ mv -n a.txt b.txt 32 | ``` 33 | --- 34 | ## Author 35 | - Mike Parker,David MacKenzie 36 | - Jim Meyering. 37 | --- 38 | -------------------------------------------------------------------------------- /commands/ps/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | ps 3 | report a snapshot of the current processes. 4 | --- 5 | 6 | ## Description 7 | ps displays information about a selection of the active processes. 8 | --- 9 | 10 | ## Syntax 11 | ```bash 12 | ps [options] 13 | ``` 14 | --- 15 | 16 | ## Options/Flag 17 | - ps -e/-A = select every processes on the system. 18 | ## usage 19 | ```bash 20 | ps -e 21 | ``` 22 | ```bash 23 | ps -A 24 | ``` 25 | - ps T = Select all processes associated with this terminal. 26 | ## usage 27 | ```bash 28 | ps T 29 | ``` 30 | - ps r = Restrict the selection to only running processes. 31 | ## usage 32 | ```bash 33 | ps r 34 | ``` 35 | - ps -d = Select all processes except session leaders. 36 | ## usage 37 | ```bash 38 | ps -d 39 | ``` 40 | ## Authors 41 | - Branko Lankester 42 | - Michael K. Johnson 43 | 44 | --- 45 | -------------------------------------------------------------------------------- /commands/whoami/README.md: -------------------------------------------------------------------------------- 1 | # whoami 2 | Print effective username. 3 | 4 | --- 5 | 6 | ## Description 7 | Prints the username associated with the current effective user ID. 8 | 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | $ whoami [options] 14 | ``` 15 | 16 | --- 17 | 18 | ## Options/Flags 19 | - ### --help: 20 | Display this help and exit 21 | ```bash 22 | $ whoami --help 23 | ``` 24 | - ### --version: 25 | Display the version and exit 26 | ```bash 27 | $ whoami --version 28 | ``` 29 | --- 30 | 31 | ## Author 32 | - Richard Mlynarik 33 | 34 | --- 35 | 36 | ## Copyright 37 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later .
38 | This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. 39 | 40 | 41 | -------------------------------------------------------------------------------- /commands/exit/README.md: -------------------------------------------------------------------------------- 1 | # exit 2 | Exit the shell. 3 | 4 | --- 5 | 6 | ## Description 7 | The `exit` command is used to exit the current shell or terminal session. 8 | 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | exit [n] 14 | ``` 15 | 16 | --- 17 | 18 | ## Options/Flags 19 | - ### --help: 20 | Print a short help text and exit. 21 | ```bash 22 | $ exit --help 23 | ``` 24 | 25 | --- 26 | 27 | ## Exit Status 28 | - **0** = Success 29 | - **!0** = Failure 30 | 31 | --- 32 | 33 | ## Note 34 | ### The exit status(n) is a numeric value that indicates the success or failure of the last executed command. A value of 0 usually means success, and any other value indicates an error. 35 | - If 'n' is omitted, it will exit the current shell or terminal session and the exit status is that of the last command executed. 36 | - If you provide an optional exit status 'n', it will exit the shell with that status. 37 | 38 | --- 39 | -------------------------------------------------------------------------------- /commands/which/README.md: -------------------------------------------------------------------------------- 1 | # which 2 | Locate a command. 3 | 4 | --- 5 | 6 | ## Description 7 | `which` returns the pathnames of the files (or links) that would be executed in the current environment. It does this by searching the PATH for executable files matching the names of the arguments. It does not canonicalize path names. 8 | 9 | --- 10 | 11 | ## Syntax 12 | ### Common usage: 13 | ```bash 14 | $ which [command] 15 | ``` 16 | 17 | ### With flags: 18 | ```bash 19 | $ which [flag] [filename]... 20 | ``` 21 | 22 | --- 23 | 24 | ## Options/Flags 25 | - ### -a: 26 | #### Print all matching pathnames of each argument. 27 | ```bash 28 | $ which -a [filename]... 29 | ``` 30 | 31 | --- 32 | 33 | ## Exit Status 34 | - **0** = If all specified commands are found and executable 35 | - **1** = If one or more specified commands are nonexistent or not executable 36 | - **2** = If an invalid option is specified 37 | 38 | --- 39 | -------------------------------------------------------------------------------- /commands/paste/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | 3 | paste 4 | 5 | --- 6 | 7 | ## Description 8 | 9 | - Used to join files horizontally (parallel merging) by outputting lines consisting of lines from each file specified, separated by tab as delimiter, to the standard output. 10 | 11 | --- 12 | 13 | ## Syntax 14 | 15 | ```bash 16 | $ paste [OPTION]... [FILE]... 17 | ``` 18 | 19 | --- 20 | 21 | ## Options/Flags 22 | 23 | - ### -d (delimiter): 24 | The `paste` command uses the tab delimiter by default for merging the files. 25 | The delimiter can be changed to any other character by using the `-d` option. 26 | ```bash 27 | $ paste -d "|" filename1 filename2 filename3 28 | ``` 29 | - ### -s (serial): 30 | We can merge the files in a sequential manner using the `-s` option. 31 | ```bash 32 | $ paste -s filename1 filename2 filename3 33 | ``` 34 | 35 | --- 36 | 37 | ## Exit Status 38 | 39 | - **0** = Successful execution 40 | - **1** = Error Occurrence 41 | 42 | --- 43 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Command 2 | Command name 3 | 4 | --- 5 | 6 | ## Description 7 | Short description about the command. 8 | 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | syntax of command 14 | ``` 15 | 16 | --- 17 | 18 | ## Options/Flags 19 | - ### Option no. 1 and it's use. 20 | ```bash 21 | $ syntax 22 | ``` 23 | - ### Option no. 2 and it's use. 24 | ```bash 25 | $ syntax 26 | ``` 27 | - ### Option no. 3 and it's use. 28 | ```bash 29 | $ syntax 30 | ``` 31 | . 32 | . 33 | . 34 | 35 | --- 36 | 37 | ## Exit Status 38 | - **x** = Meaning 39 | - **y** = Meaning 40 | --- 41 | 42 | ## Author 43 | - first_name middle_name last_name 44 | - first_name last_name. 45 | 46 | --- 47 | 48 | ## Copyright 49 | Copyright if available. 50 | 51 | --- 52 | > **_NOTE:_** For an example click [here](https://github.com/Walchand-Linux-Users-Group/linux/blob/main/commands/ls/README.md). 53 | > Few fields are not necessary such as: 54 | > - Author 55 | > - Copyright 56 | > - Exit Status 57 | -------------------------------------------------------------------------------- /commands/info/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | info 3 | 4 | --- 5 | 6 | ## Description 7 | Reads the documentation giving detailed information for a command when compared with `man` page 8 | 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | info [OPTION]... [MENU-ITEM...] 14 | ``` 15 | 16 | --- 17 | 18 | ## Options/Flags 19 | - ### It uses all the matching manuals and displays them for a particular command 20 | ```bash 21 | $ info -a [ITEM] 22 | 23 | ``` 24 | - ### Looks up STRING in all indices of all manuals and displays the same 25 | ```bash 26 | $ info -k [ITEM] 27 | ``` 28 | - ### Displays command-line options node for a articular command and displays it 29 | ```bash 30 | $ info -o [ITEM] 31 | ``` 32 | - ### Displays this help and exit 33 | ```bash 34 | $ info -h 35 | ``` 36 | - ### Displays this help and exit 37 | ```bash 38 | $ info -h 39 | ``` 40 | - ### Output version info and exit 41 | ```bash 42 | $ info --version 43 | ``` 44 | . 45 | . 46 | . 47 | 48 | --- 49 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Walchand Linux Users' Group 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /commands/ifconfig/README.md: -------------------------------------------------------------------------------- 1 | # ifconfig 2 | Interface configuration 3 | 4 | --- 5 | 6 | ## Description 7 | Ifconfig is used to configure the kernel-resident network interfaces. It is used at boot time to set up interfaces as necessary. After that, it is usually only needed when debugging or when system tuning is needed. 8 | 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | ifconfig -AaC interface address_family address dest_address parameters 14 | ``` 15 | 16 | --- 17 | 18 | ## Options/Flags 19 | - ### View network settings of an Ethernet adapter 20 | ```bash 21 | $ ifconfig eth0 22 | ``` 23 | - ### Display details of all interfaces, including disabled interfaces 24 | ```bash 25 | $ ifconfig -a 26 | ``` 27 | - ### Disable eth0 interface 28 | ```bash 29 | $ ifconfig eth0 down 30 | ``` 31 | - ### Enable eth0 interface 32 | ```bash 33 | $ ifconfig eth0 up 34 | ``` 35 | - ### Assign IP address to eth0 interface 36 | ```bash 37 | $ ifconfig eth0 [ip_address] 38 | ``` 39 | 40 | 41 | --- 42 | 43 | ## Author 44 | - Fred N. van Kempen 45 | - Alan Cox 46 | - Phil Blundell 47 | - Bernd Eckenfels 48 | - Andi Kleen 49 | 50 | --- 51 | -------------------------------------------------------------------------------- /commands/lsub/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | lsusb 3 | 4 | --- 5 | 6 | ## Description 7 | `lsusb` is a utility for displaying information about USB buses in the system and the devices connected to them. 8 | 9 | 10 | --- 11 | 12 | ## Syntax 13 | ```bash 14 | $ lsusb [options] 15 | ``` 16 | 17 | --- 18 | 19 | ## Options/Flags 20 | - ### -v, --verbose: 21 | Tells `lsusb` to be verbose and display detailed information about the devices shown. 22 | ```bash 23 | $ lsusb -v 24 | ``` 25 | 26 | 27 | - ### -t: 28 | Tells `lsusb` to dump the physical USB device hierarchy as a tree. 29 | ```bash 30 | $ lsusb -t 31 | ``` 32 | 33 | 34 | - ### -s [[bus]:][devnum] 35 | Show only devices in specified bus and/or devnum. Both ID's are given in decimal and may be omitted. 36 | ```bash 37 | $ lsusb -s : 38 | ``` 39 | 40 | --- 41 | 42 | ## Author 43 | - Thomas Sailer 44 | 45 | --- 46 | 47 | ## Copyright 48 | 49 | Copyright © [Year] Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later.
50 | This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. 51 | 52 | -------------------------------------------------------------------------------- /commands/tac/README.md: -------------------------------------------------------------------------------- 1 | # tac 2 | Reverse of concatenation 3 | 4 | --- 5 | 6 | ## Description 7 | It is used to concatenate specific files in reversed order. 8 | We can view the content of the file in reverse order if lines. 9 | 10 | --- 11 | 12 | ## Syntax 13 | ```bash 14 | tac [FILE] 15 | ``` 16 | --- 17 | 18 | ## Options/Flags 19 | - ### Attach the separator before instead of after. 20 | ```bash 21 | $ tac -b [FILE] 22 | ``` 23 | - ### Interpret the seperator as a regular expression. 24 | ```bash 25 | $ tac -r [FILE] 26 | ``` 27 | - ### Use STRING as the separator instead of newline 28 | ```bash 29 | $ tac -s=STRING [FILE] 30 | ``` 31 | - ### For Help 32 | ```bash 33 | $ tac --help 34 | ``` 35 | - ### Output Version Information. 36 | ```bash 37 | $ tac --version 38 | ``` 39 | 40 | --- 41 | 42 | ## Exit Status 43 | - **0** = OK 44 | --- 45 | 46 | ## Author 47 | - Jay Lepreau and David MacKenzie 48 | 49 | --- 50 | 51 | ## Copyright 52 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later. 53 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 54 | -------------------------------------------------------------------------------- /commands/dpkg-deb/README.md: -------------------------------------------------------------------------------- 1 | # dpkg-deb 2 | 3 | --- 4 | 5 | ## Description 6 | 7 | 8 | --- 9 | 10 | ## Syntax 11 | ```bash 12 | dpkg-deb [OPTIONS/FlAGS] [COMMAND] 13 | ``` 14 | --- 15 | 16 | ## Options/Flags 17 | - ### Display information about a package. 18 | ```bash 19 | $ dpkg-deb --info [path/to/file.deb] 20 | ``` 21 | - ### Display the package's name and version on one line. 22 | ```bash 23 | $ dpkg-deb --show [path/to/file.deb] 24 | ``` 25 | - ### Create a package from a specified directory. 26 | ```bash 27 | $ dpkg-deb --build [[path/to/directory] 28 | ``` 29 | - ### List the package contents. 30 | ```bash 31 | $ dpkg-deb --contents [path/to/file.deb] 32 | ``` 33 | 34 | --- 35 | 36 | ## Exit Status 37 | - The requested action was succesfully performed. 38 | - Fatal or unrecoverable error due to invalid command-line usage, or interaction with the system, such as accessses to the database, memory allocaton, etc. 39 | 40 | --- 41 | 42 | ## Copyright 43 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later. 44 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 45 | -------------------------------------------------------------------------------- /commands/rename/README.md: -------------------------------------------------------------------------------- 1 | # rename 2 | rename files 3 | 4 | --- 5 | 6 | ## Description 7 | It is used to rename files. 8 | We can change one or multiple filename at a time 9 | 10 | --- 11 | 12 | ## Syntax 13 | ```bash 14 | rename [foo] [bar] [*] 15 | ``` 16 | --- 17 | 18 | ## Options/Flags 19 | - ### Rename without performing them. 20 | ```bash 21 | $ rename -vn [foo] [bar] [*] 22 | ``` 23 | - ### Rename without overwriting existing files 24 | ```bash 25 | $ rename -o [foo] [bar] [*] 26 | ``` 27 | - ### Prepend "foo" to all filenames in current directory. 28 | ```bash 29 | $ rename [''] ['foo'] [*] 30 | ``` 31 | - ### Change file extensions. 32 | ```bash 33 | $ rename [.pdf] [.txt] [*.pdf] 34 | ``` 35 | 36 | --- 37 | 38 | ## Exit Status 39 | - **0** = OK 40 | - **1** = All Failed 41 | - **2** = Some Failed 42 | - **4** = Nothing renamed 43 | - **64** = Unanticipated Error Occcured 44 | --- 45 | 46 | ## Author 47 | - Ravi Jha 48 | 49 | --- 50 | 51 | ## Copyright 52 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later. 53 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 54 | -------------------------------------------------------------------------------- /commands/cd/README.md: -------------------------------------------------------------------------------- 1 | # cd 2 | change directory 3 | 4 | --- 5 | 6 | ## Description 7 | It is used to change current working directory. 8 | We move in a sub directory or super directory in our system. 9 | 10 | --- 11 | 12 | ## Syntax 13 | ```bash 14 | cd [directory] 15 | ``` 16 | --- 17 | 18 | ## Options/Flags 19 | - ### Move to previous directory. 20 | ```bash 21 | $ cd - 22 | ``` 23 | - ### Move to parent directory. 24 | ```bash 25 | $ cd .. 26 | ``` 27 | - ### Move to system's working directory. 28 | ```bash 29 | $ cd / 30 | ``` 31 | - ### Move to default working directory. 32 | ```bash 33 | $ cd 34 | ``` 35 | - ### Move to other user's home directory. 36 | ```bash 37 | $ cd ~[username] 38 | ``` 39 | - ### Move to directory with space in it's name. 40 | ```bash 41 | $ cd directory\ with\ a\ space\ in\ its\ name 42 | ``` 43 | 44 | --- 45 | 46 | ## Exit Status 47 | - **0** = OK 48 | - **>0** = Error 49 | --- 50 | 51 | ## Author 52 | - Ravi Jha 53 | 54 | --- 55 | 56 | ## Copyright 57 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later. 58 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 59 | -------------------------------------------------------------------------------- /commands/du: -------------------------------------------------------------------------------- 1 | 1 du 2 | du 3 | ________________________________________ 4 | 2 Description 5 | du Command used for disk usage, file space usage 6 | ________________________________________ 7 | 3 Syntax 8 | du [OPTION]... [FILE]... 9 | du [OPTION]... --files0-from=F 10 | ________________________________________ 11 | 4 Options/Flags 12 | -0 : end each output line with NULL 13 | -a : write count of all files, not just directories 14 | –apparent-size : print apparent sizes, rather than disk usage. 15 | -B, –block-size=SIZE : scale sizes to SIZE before printing on console 16 | -c, –total : produce grand total 17 | -d, –max-depth=N : print total for directory only if it is N or fewer levels below command line argument 18 | -h, print sizes in human readable format 19 | -S, -separate-dirs : for directories, don’t include size of subdirectories 20 | -s, –summarize : display only total for each directory 21 | –time : show time of last modification of any file or directory. 22 | 23 | ________________________________________ 24 | 5 Exit Status 25 | du -h /home/kuldeep/hackoctober 26 | 27 | Output: 28 | 40K /home/kuldeep/hackoctober/hari 29 | 70.0M /home/kuldeep/hackoctober/system file 30 | ________________________________________ 31 | 6 Author 32 | Kuldeep________________________________________ 33 | 34 | -------------------------------------------------------------------------------- /commands/htop/README.md: -------------------------------------------------------------------------------- 1 | # htop 2 | 3 | An interactive process viewer. 4 | 5 | --- 6 | 7 | 8 | ## Description 9 | htop is a terminal-based process viewer that provides a real-time, interactive display of system processes and resource utilization. 10 | 11 | --- 12 | 13 | 14 | ## Syntax 15 | 16 | ```bash 17 | htop [options] 18 | ``` 19 | --- 20 | 21 | 22 | ## Options/Flags 23 | - ### -d 24 | Set the delay between updates, in tenths of seconds. 25 | ```bash 26 | $ htop -d 10 27 | ``` 28 | - ### -C 29 | Start htop in monochrome mode. 30 | ```bash 31 | $ htop -C 32 | ``` 33 | - ### -u 34 | Show only the processes of a given user. 35 | ```bash 36 | $ htop -u username 37 | ``` 38 | - ### -h 39 | Used to display the help message and exit. 40 | ```bash 41 | $ htop -h 42 | ``` 43 | 44 | --- 45 | 46 | 47 | ## Exit Status 48 | 49 | - **0** = The command executed successfully. 50 | 51 | --- 52 | 53 | 54 | ## Author 55 | 56 | - Hisham Muhammad 57 | 58 | --- 59 | 60 | 61 | ## Copyright 62 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later.
63 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 64 | -------------------------------------------------------------------------------- /commands/head/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | head 3 | 4 | --- 5 | 6 | ## Description 7 | Print the first 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name. 8 | 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | $ head [OPTION]... [FILE]... 14 | ``` 15 | 16 | --- 17 | 18 | ## Options/Flags 19 | - ### -n, --lines=[-]NUM 20 | Print the first NUM lines instead of the first 10; with the leading '-', print all but the last NUM lines of each file. 21 | ```bash 22 | $ head -n 10 filename 23 | ``` 24 | 25 | - ### -c, --bytes=[-]NUM 26 | print the first NUM bytes of each file; with the leading '-', print all but the last NUM bytes of each file. 27 | ```bash 28 | $ head -c 20 filename 29 | ``` 30 | 31 | - ### -q, --quiet, --silent 32 | Never print headers giving file names. 33 | ```bash 34 | $ head -q file1 file2 35 | ``` 36 | --- 37 | 38 | ## Author 39 | - David MacKenzie 40 | - Jim Meyering 41 | 42 | --- 43 | 44 | ## Copyright 45 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. 46 | 47 | --- 48 | 49 | -------------------------------------------------------------------------------- /commands/wget/README.md: -------------------------------------------------------------------------------- 1 | # wget 2 | Wget - The non-interactive network downloader. 3 | 4 | --- 5 | 6 | ## Description 7 | Wget is non-interactive, meaning that it can work in the background, while the user is not logged on. This allows you to start a retrieval and disconnect from the system, letting Wget finish the work. By contrast, most of the Web browsers require constant user's presence, which can be a 8 | great hindrance when transferring a lot of data. 9 | 10 | --- 11 | 12 | ## Syntax 13 | ```bash 14 | syntax of command 15 | $ wget [option]... [URL]... 16 | ``` 17 | 18 | --- 19 | 20 | ## Options/Flags 21 | - ### wget -r 22 | Wget uses GNU getopt to process command-line arguments, every option has a long form along with the short one. Long options are more convenient to remember, but take time to type. You may freely mix different option styles, or specify options after the command-line arguments. 23 | Thus you may write: 24 | ```bash 25 | $ wget -r --tries=10 http://fly.srk.fer.hr/ -o log 26 | $ wget -r 27 | ``` 28 | - ### wget -drc 29 | You may put several options that do not require arguments together, like: 30 | ```bash 31 | $ wget -drc 32 | ``` 33 | or 34 | 35 | $ wget -d -r -c 36 | 37 | --- 38 | -------------------------------------------------------------------------------- /commands/lprm/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | 3 | lprm 4 | 5 | --- 6 | 7 | ## Description 8 | 9 | - Fullform: Line Printer Remove. 10 | - This command allows users to delete or cancel print jobs that have been sent to a printer but have not yet been printed or are waiting in the print queue. 11 | 12 | --- 13 | 14 | ## Syntax 15 | 16 | ```bash 17 | $ lprm [options] [job ID(s)] 18 | ``` 19 | 20 | --- 21 | 22 | ## Options/Flags 23 | 24 | - ### -#: 25 | Removes the specified job ID from the print queue. Replace # with the job number you want to remove. 26 | ```bash 27 | $ lprm 3 28 | ``` 29 | - ### -P printer: 30 | Specifies the printer from which you want to remove the print job. Replace printer with the name of the printer. 31 | ```bash 32 | $ lprm -P printer1 33 | ``` 34 | - ### -U username: 35 | Removes all jobs from the print queue sent by the specified username. 36 | ```bash 37 | $ lprm -U user1 38 | ``` 39 | - ### -a: 40 | Removes all jobs from all printers in the queue. 41 | ```bash 42 | $ lprm -a 43 | ``` 44 | - ### -h server: 45 | Specifies the server where the printer is located. 46 | ```bash 47 | $ lprm -h serverName jobId 48 | ``` 49 | 50 | --- 51 | 52 | ## Exit Status 53 | 54 | - **0** = Successful execution 55 | - **non-zero value** = Error Occurrence 56 | 57 | --- 58 | -------------------------------------------------------------------------------- /commands/od/README.md: -------------------------------------------------------------------------------- 1 | # od 2 | display octal form 3 | 4 | --- 5 | 6 | ## Description 7 | It is used to display files in different formats. 8 | We can represent files in octal, hexadecimal, string format with or without offset. 9 | 10 | --- 11 | 12 | ## Syntax 13 | ```bash 14 | od [FILE] 15 | ``` 16 | --- 17 | 18 | ## Options/Flags 19 | - ### Display file in verbose mode (i.e without replacing duplicate lines with *) 20 | ```bash 21 | $ od -v [FILE] 22 | ``` 23 | - ### Display in Hexadecimal Format 24 | ```bash 25 | $ od -x [FILE] 26 | ``` 27 | - ### Display in Octal Format 28 | ```bash 29 | $ od -b [FILE] OR od [FILE] 30 | ``` 31 | - ### Display in String Format 32 | ```bash 33 | $ od -c [FILE] 34 | ``` 35 | - ### Display in String Format without offset 36 | ```bash 37 | $ od -An -c [FILE] 38 | ``` 39 | - ### Display as Octal 2 Byte Units 40 | ```bash 41 | $ od -o [FILE] 42 | ``` 43 | 44 | --- 45 | 46 | ## Exit Status 47 | - **0** = OK 48 | - **>0** = Error 49 | --- 50 | 51 | ## Author 52 | - Jim Meyering 53 | 54 | --- 55 | 56 | ## Copyright 57 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later. 58 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 59 | -------------------------------------------------------------------------------- /commands/tail/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | tail 3 | 4 | --- 5 | 6 | ## Description 7 | Print the last 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name. 8 | 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | $ tail [options] [file(s)] 14 | ``` 15 | 16 | --- 17 | 18 | ## Options/Flags 19 | - ### -n, --lines=[+]NUM 20 | Output the last NUM lines, instead of the last 10; or use -n +NUM to output starting with line NUM. 21 | ```bash 22 | $ tail -n 10 filename 23 | ``` 24 | 25 | - ### -c, --bytes=[+]NUM 26 | Output the last NUM bytes; or use -c +NUM to output starting with byte NUM of each file. 27 | ```bash 28 | $ tail -c 20 filename 29 | ``` 30 | 31 | - ### -f, --follow[={name|descriptor}] 32 | Output appended data as the file grows, Absent option argument means 'descriptor'. 33 | ```bash 34 | $ tail -f filename 35 | ``` 36 | 37 | --- 38 | 39 | ## Author 40 | - Paul Rubin 41 | - Ian Lance Taylor 42 | - Jim Meyering 43 | 44 | --- 45 | 46 | ## Copyright 47 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later .
48 | This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. 49 | 50 | 51 | --- 52 | -------------------------------------------------------------------------------- /commands/top/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | 3 | top 4 | 5 | --- 6 | 7 | ## Description 8 | 9 | - To show the Linux processes. 10 | - It provides a dynamic real-time view of the running system. 11 | - It also displays a continuously 12 | updated list of processes along with information on CPU utilization, memory usage, and 13 | other key statistics. 14 | 15 | --- 16 | 17 | ## Syntax 18 | 19 | top 20 | 21 | --- 22 | 23 | ## Options/Flags 24 | 25 | ### • Specifies the delay between updates. 26 | 27 | $ top -d 28 | 29 | ### • Limits the number of iterations or updates before exiting. 30 | 31 | $ top -n 32 | 33 | ### • capture output for scripts or further processing 34 | 35 | $ top -b 36 | 37 | ### • Shows the full command path for processes. 38 | 39 | $ top -c 40 | 41 | ### • Ignores case when sorting by command name 42 | 43 | $ top -i 44 | 45 | ### • Limits display to processes owned by a specific user. 46 | 47 | $ top -u 48 | 49 | ### • Displays information only for the specified process ID. 50 | 51 | $ top -p 52 | 53 | ### • Skipping summary information at the top of the display. 54 | 55 | $ top -q 56 | 57 | ### • Displays a help message with information about available options. 58 | 59 | $ top -h 60 | 61 | --- 62 | 63 | ## Author 64 | 65 | • Roger Binns. 66 | -------------------------------------------------------------------------------- /commands/lpq/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | 3 | lpq 4 | 5 | --- 6 | 7 | ## Description 8 | 9 | - Fullform: Line Printer Queue. 10 | - Used to display the status of a printer's print queue. 11 | - It shows information about the jobs that are waiting to be printed, including their IDs, owners, and status in the print queue. 12 | 13 | --- 14 | 15 | ## Syntax 16 | 17 | ```bash 18 | $ lpq [options] [printer] 19 | ``` 20 | 21 | --- 22 | 23 | ## Options/Flags 24 | 25 | - ### -a: 26 | Shows the status of all printers. 27 | ```bash 28 | $ lpq -a 29 | ``` 30 | - ### -l: 31 | Displays additional details about each print job, such as the job ID, owner, file size, date and time of submission, and the status of the job in the queue. 32 | ```bash 33 | $ lpq -l 34 | ``` 35 | - ### -P printer: 36 | Specifies a specific printer to check. 37 | ```bash 38 | $ lpq -P printer_name 39 | ``` 40 | 41 | --- 42 | 43 | ## Exit Status 44 | 45 | - **0** = Successful execution 46 | - **non-zero value** = Error Occurrence 47 | 48 | --- 49 | 50 | ## Project 51 | 52 | - Common Unix Printing System(CUPS) Project 53 | 54 | --- 55 | 56 | ## Copyright 57 | 58 | Copyright © Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later. 59 | This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. 60 | 61 | --- 62 | -------------------------------------------------------------------------------- /commands/xdg-open/README.md: -------------------------------------------------------------------------------- 1 | # xdg-open 2 | Opens a file or URL in the user's preferred application. 3 | 4 | --- 5 | 6 | ## Description 7 | xdg-open is for use inside a desktop session only. It is not recommended to use xdg-open as root. 8 | 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | $ xdg-open {file | URL} 14 | ``` 15 | 16 | --- 17 | 18 | ## Options/Flags 19 | - ### --version : 20 | This option will show the xdg-utils version information. 21 | ```bash 22 | $ xdg-open -–version 23 | ``` 24 | - ### --help: 25 | This option will show command synopsis. 26 | ```bash 27 | $ xdg-open –-help 28 | ``` 29 | - ### --manual: 30 | This option will show the manual page. 31 | ```bash 32 | $ xdg-open --manual 33 | ``` 34 | - ### -v: 35 | Enable verbose mode for debugging. 36 | ```bash 37 | $ xdg-open -v {file | URL} 38 | ``` 39 | 40 | --- 41 | 42 | ## Exit Status 43 | - **0**: The command executed successfully. 44 | - **1**: An error occurred during the execution of the command. 45 | 46 | --- 47 | 48 | ## Author 49 | - The xdg-utils package is a collaborative effort by multiple contributors. 50 | 51 | --- 52 | 53 | ## Copyright 54 | - The xdg-utils package is typically distributed under the MIT License or similar open-source licenses. 55 | - Copyright and license information can vary based on the specific distribution and version of xdg-utils. 56 | 57 | --- 58 | 59 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Linux 2 | 3 | #### A collection of Linux commands and their information from flags to the authors. 4 | 5 | --- 6 | 7 | ## Contributing 8 | 9 | To ensure a smooth contribution process, please follow the guidelines below. 10 | 11 | ### Guidelines for Contribution: 12 | 13 | Follow the code style and formatting guidelines as outlined below: 14 | 15 | 1. Navigate to the `commands` folder. 16 | 2. Create a folder for the command you are adding and name it as the command you are adding. 17 | 3. Inside the command folder, add a `README.md` file with the relevant information and use the template provided in [CONTRIBUTING.md](https://github.com/Walchand-Linux-Users-Group/linux/blob/main/CONTRIBUTING.md). 18 | 4. Follow any specific guidelines and add the relevant information as per the `CONTRIBUTING.md` template. 19 | 20 | Contributions are highly encouraged, and we appreciate your effort in maintaining a consistent structure for commands. 21 | 22 | --- 23 | 24 | ## Acknowledgments: 25 | 26 | A big thank you to all contributors! Check out the [list of contributors](https://github.com/Walchand-Linux-Users-Group/linux/graphs/contributors). 27 | 28 | Feel free to join the WLUG discord server to connect with other contributors and project maintainers. 29 | 30 | --- 31 | 32 |

Community | Knowledge | Share

33 | 34 | --- 35 | -------------------------------------------------------------------------------- /commands/shutdown/README.md: -------------------------------------------------------------------------------- 1 | # shutdown 2 | Power-off the machine. 3 | 4 | --- 5 | 6 | ## Description 7 | `shutdown` may be used to halt, power off, or reboot the machine. 8 | 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | $ shutdown [OPTIONS...] [TIME] [WALL...] 14 | ``` 15 | 16 | --- 17 | 18 | ## Options/Flags 19 | - ### --help: 20 | Print a short help text and exit. 21 | ```bash 22 | $ shutdown --help 23 | ``` 24 | - ### -H, --halt : 25 | Halt the machine. 26 | ```bash 27 | $ shutdown -H 28 | ``` 29 | - ### -P, --poweroff: 30 | Power the machine off (the default). 31 | ```bash 32 | $ shutdown 33 | ``` 34 | or 35 | ```bash 36 | $ shutdown -P 37 | ``` 38 | - ### -r, --reboot: 39 | Reboot the machine. 40 | ```bash 41 | $ shutdown -r 42 | ``` 43 | - ### -k: 44 | Do not halt, power off, or reboot, but just write the wall message. 45 | ```bash 46 | $ shutdown -k 47 | ``` 48 | - ### --no-wall: 49 | Do not send wall message before halt, power off, or reboot. 50 | ```bash 51 | $ shutdown --no-wall 52 | ``` 53 | - ### -c: 54 | Cancel a pending shutdown. 55 | ```bash 56 | $ shutdown -c 57 | ``` 58 | - ### --show: 59 | Show a pending shutdown action and time if there is any. 60 | ```bash 61 | $ shutdown --show 62 | ``` 63 | 64 | --- 65 | 66 | ## Exit Status 67 | - **0** = Success 68 | - **!0** = Failure 69 | --- 70 | -------------------------------------------------------------------------------- /commands/diff/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | 3 | diff 4 | 5 | --- 6 | 7 | ## Description 8 | 9 | This command is used to display the differences in the files by comparing the files line by line. 10 | 11 | --- 12 | 13 | ## Syntax 14 | 15 | ```bash 16 | $ diff [options] File1 File2 17 | ``` 18 | 19 | --- 20 | 21 | ## Options/Flags 22 | 23 | - ### -q 24 | Report only when files differ. 25 | ```bash 26 | $ diff -q 27 | ``` 28 | - ### -s 29 | Report when two files are the same. 30 | ```bash 31 | $ diff -s 32 | ``` 33 | - ### -c 34 | View differences in context mode. 35 | ```bash 36 | $ diff -c 37 | ``` 38 | - ### -u 39 | View differences in unified mode. 40 | ```bash 41 | $ diff -u 42 | ``` 43 | - ### -e 44 | Output an ed script. 45 | ```bash 46 | $ diff -e 47 | ``` 48 | - ### -y 49 | Output in two columns. 50 | ```bash 51 | $ diff -y 52 | ``` 53 | - ### -n 54 | Output an RCS format diff. 55 | ```bash 56 | $ diff -n 57 | ``` 58 | 59 | --- 60 | 61 | ## Author 62 | 63 | - Paul Eggert 64 | - Mike Haertel 65 | - David Hayes 66 | - Richard Stallman 67 | - Len Tower 68 | 69 | --- 70 | 71 | ## Copyright 72 | 73 | Copyright © 2021 Free Software Foundation, Inc. License GPLv3+: GNU 74 | GPL version 3 or later .
75 | This is free software: you are free to change and redistribute it. 76 | There is NO WARRANTY, to the extent permitted by law. 77 | 78 | --- 79 | -------------------------------------------------------------------------------- /commands/sudo/README.md: -------------------------------------------------------------------------------- 1 | # sudo 2 | super user do 3 | 4 | --- 5 | 6 | ## Description 7 | - It will run a command with safe elevated privileges which are required to perform certain administrative tasks. 8 | - An alternative way to peform administrative tasks without switching to root user. 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | sudo [command] 14 | ``` 15 | --- 16 | 17 | ## Flags 18 | - ### -V (version) 19 | ```bash 20 | $ sudo -V 21 | ``` 22 | - ### -l (list) 23 | ```bash 24 | $ sudo -l 25 | ``` 26 | - ### -h (help) 27 | ```bash 28 | $ sudo -h 29 | ``` 30 | - ### -v (validate) 31 | ```bash 32 | $ sudo -v 33 | ``` 34 | - ### -k (kill) 35 | ```bash 36 | $ sudo -k 37 | ``` 38 | - ### -K (sure kill) 39 | ```bash 40 | $ sudo -K 41 | ``` 42 | - ### -b (background) 43 | ```bash 44 | $ sudo -b 45 | ``` 46 | - ### -p (prompt) 47 | ```bash 48 | $ sudo -p 49 | ``` 50 | --- 51 | 52 | ## Examples 53 | - ### rebooting 54 | ```bash 55 | $ sudo reboot 56 | ``` 57 | - ### updating 58 | ```bash 59 | $ sudo apt-get update 60 | ``` 61 | 62 | ## Original authors 63 | - Robert Coggeshall 64 | - Cliff Spencer 65 | 66 | --- 67 | 68 | ## Copyright 69 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later. 70 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 71 | -------------------------------------------------------------------------------- /commands/pwd/README.md: -------------------------------------------------------------------------------- 1 | # pwd 2 | pwd - print name of current/working directory 3 | 4 | --- 5 | 6 | ## Description 7 | Print the full filename of the current working directory. 8 | 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | pwd [OPTION] 14 | ``` 15 | --- 16 | 17 | ## Options/Flags 18 | - ### use PWD from environment, even if it contains symlinks 19 | ```bash 20 | $ pwd -L 21 | ``` 22 | `OR` 23 | 24 | ```bash 25 | $ pwd --logical 26 | ``` 27 | - ### avoid all symlinks 28 | ```bash 29 | $ pwd -P 30 | ``` 31 | `OR` 32 | 33 | ```bash 34 | $ pwd --physical 35 | ``` 36 | - ### Display this help and exit 37 | ```bash 38 | $ pwd -h 39 | ``` 40 | `OR` 41 | 42 | ```bash 43 | $ pwd -h 44 | ``` 45 | - ### Output version information and exit 46 | ```bash 47 | $ pwd --version 48 | ``` 49 | - ### If no option is specified, -P is assumed. ### 50 | 51 | --- 52 | 53 | ## REPORTING BUGS 54 | - GNU coreutils online help: 55 | 56 | - Report any translation bugs to 57 | 58 | 59 | --- 60 | 61 | ## Author 62 | - Jim Meyering 63 | 64 | --- 65 | 66 | ## Copyright 67 | Copyright © 2020 Free Software Foundation, Inc. License GPLv3+: 68 | GNU GPL version 3 or later . 69 | This is free software: you are free to change and redistribute 70 | it. There is NO WARRANTY, to the extent permitted by law. -------------------------------------------------------------------------------- /commands/ss/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | 3 | ss 4 | 5 | --- 6 | 7 | ## Description 8 | 9 | - Socket Statistics. 10 | - Another utility to investigate sockets. 11 | - It is a potent tool for inspecting and displaying detailed information about network sockets on a Linux system. 12 | 13 | --- 14 | 15 | ## Syntax 16 | 17 | ```bash 18 | $ ss [options] 19 | ``` 20 | 21 | --- 22 | 23 | ## Options/Flags 24 | 25 | - ### -a 26 | Display all sockets. 27 | ```bash 28 | $ ss -a 29 | ``` 30 | - ### -i 31 | Show internal TCP information. 32 | ```bash 33 | $ ss -i 34 | ``` 35 | - ### -p 36 | Show process using socket. 37 | ```bash 38 | $ ss -p 39 | ``` 40 | - ### -O 41 | Print each socket's data on a single line. 42 | ```bash 43 | $ ss -O 44 | ``` 45 | - ### -t 46 | Print Sockets TCP. 47 | ```bash 48 | $ ss -t 49 | ``` 50 | - ### -u 51 | Print Sockets UDP. 52 | ```bash 53 | $ ss -u 54 | ``` 55 | - ### -m 56 | Print socket memory usage. 57 | ```bash 58 | $ ss -m 59 | ``` 60 | - ### -K 61 | Attempts to forcibly close sockets. 62 | ```bash 63 | $ ss -K 64 | ``` 65 | - ### -E 66 | Continually display sockets as they are destroyed. 67 | ```bash 68 | $ ss -E 69 | ``` 70 | 71 | --- 72 | 73 | ## Author 74 | 75 | - Alexey Kuznetsov 76 | 77 | --- 78 | 79 | ## Copyright 80 | 81 | Copyright © Alexey Kuznetsov. License GPLv3+: GNU GPL version 3 or later.
82 | This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. 83 | -------------------------------------------------------------------------------- /commands/ncal/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | 3 | ncal 4 | 5 | --- 6 | 7 | ## Description 8 | 9 | Displays a calendar and the date of Easter. 10 | 11 | --- 12 | 13 | ## Syntax 14 | 15 | ```bash 16 | $ ncal 17 | ``` 18 | 19 | --- 20 | 21 | ## Options/Flags 22 | 23 | - ### -h 24 | Turns off highlighting of today. 25 | ```bash 26 | $ ncal -h 27 | ``` 28 | - ### -e 29 | Display date of Easter. 30 | ```bash 31 | $ ncal -e 32 | ``` 33 | - ### -w 34 | 35 | Print the number of the week below each week column. 36 | 37 | ```bash 38 | $ ncal -w 39 | ``` 40 | 41 | - ### -y 42 | 43 | Print the calendar of the whole year. 44 | 45 | ```bash 46 | $ ncal -y [year] 47 | ``` 48 | 49 | - ### -m 50 | 51 | Display the specified month. 52 | 53 | ```bash 54 | $ ncal -m [month name] 55 | ``` 56 | 57 | - ### -M/-S 58 | 59 | Weeks start on Monday/Sunday. 60 | 61 | ```bash 62 | $ ncal -M 63 | ``` 64 | 65 | ```bash 66 | $ ncal -S 67 | ``` 68 | 69 | - ### -b 70 | 71 | Display the calender in oldstyle format. 72 | 73 | ```bash 74 | $ ncal -b 75 | ``` 76 | 77 | - ### -B 78 | 79 | Weeks start on 80 | 81 | ```bash 82 | $ ncal -B [number of months] 83 | ``` 84 | 85 | --- 86 | 87 | ## Author 88 | 89 | - Wolfgang Helbig 90 | 91 | --- 92 | 93 | ## Copyright 94 | 95 | Copyright © 2023
Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later.
96 | This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. 97 | -------------------------------------------------------------------------------- /commands/wc/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | 3 | wc 4 | 5 | --- 6 | 7 | ## Description 8 | 9 | - Fullform: Word Count. 10 | - Used to find out number of lines, word count, byte and characters count in the files specified in the file arguments. 11 | - By default it displays four-columnar output, First column shows number of lines present in a file specified, second column shows number of words present in the file, third column shows number of characters present in file and fourth column itself is the file name which are given as argument. 12 | 13 | --- 14 | 15 | ## Syntax 16 | 17 | ```bash 18 | $ wc [OPTION]... [FILE]... 19 | ``` 20 | 21 | --- 22 | 23 | ## Options/Flags 24 | 25 | - ### -l: 26 | This option prints the number of lines present in a file. 27 | ```bash 28 | $ wc -l myfile.txt 29 | ``` 30 | - ### -w: 31 | This option prints the number of words present in a file. 32 | ```bash 33 | $ wc -w myfile.txt 34 | ``` 35 | - ### -c: 36 | This option displays count of bytes present in a file. 37 | ```bash 38 | $ wc -c myfile.txt 39 | ``` 40 | - ### -m: 41 | Using the `-m` option `wc` command displays count of characters from a file. 42 | ```bash 43 | $ wc -m myfile.txt 44 | ``` 45 | - ### -L: 46 | Used to print out the length of longest (number of characters) line in a file. 47 | ```bash 48 | $ wc -L myfile.txt 49 | ``` 50 | 51 | --- 52 | 53 | ## Exit Status 54 | 55 | - **0** = Successful execution 56 | - **0 < value** = Error Occurrence 57 | 58 | --- 59 | 60 | ## Author 61 | 62 | - Joe Ossanna 63 | 64 | --- 65 | -------------------------------------------------------------------------------- /commands/fg/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | 3 | fg 4 | 5 | --- 6 | 7 | ## Description 8 | - It is used to put a background job in foreground. 9 | 10 | --- 11 | 12 | ## Syntax 13 | ```bash 14 | $ fg [jobID] 15 | ``` 16 | 17 | --- 18 | 19 | ## The jobID can be 20 | - **PID** (process id) 21 | - **%Number** -> Refers to a job by the job number. 22 | - **%String** -> Refers to a job whose name begins with the specified string. 23 | - **%?String** -> Refers to a job whose name contains the specified string. 24 | - **%+** OR **%%** -> Refers to the current job. 25 | - **%-** -> Refers to the previous job. 26 | 27 | --- 28 | 29 | ## Note 30 | - If the jobID parameter is not supplied, the fg command uses the job most recently suspended, placed in the background, or run as a background job. 31 | 32 | --- 33 | 34 | ## Options/Flags 35 | - ### --help 36 | It displays help Information. 37 | ```bash 38 | $ fg --help 39 | ``` 40 | 41 | --- 42 | 43 | ## You can also use the fg command to bring a job to the foreground from a different terminal. 44 | - To do this, you would use the following command: 45 | ```bash 46 | $ fg : 47 | ``` 48 | 49 | --- 50 | 51 | ## Exit status 52 | - **0** -> Successful completion. 53 | - **>0** -> An error occurred. 54 | --- 55 | 56 | ## Copyright 57 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later.
58 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 59 | -------------------------------------------------------------------------------- /commands/shred/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | 3 | shred 4 | 5 | --- 6 | 7 | ## Description 8 | Overwrite the specified FILE(s) repeatedly, in order to make it harder for even very expensive hardware probing to recover the data. 9 | 10 | Mandatory arguments to long options are mandatory for short options too. 11 | 12 | --- 13 | 14 | ## Syntax 15 | ```bash 16 | $ shred [OPTION]... FILE... 17 | ``` 18 | --- 19 | 20 | ## Options/Flags 21 | - ### change permissions to allow writing if necessary 22 | ```bash 23 | $ shred -f, --force 24 | ``` 25 | - ### overwrite N times instead of the default (3) 26 | ```bash 27 | $ shred -n, --iterations=N 28 | ``` 29 | - ### truncate and remove file after overwriting 30 | ```bash 31 | $ shred -u, --remove 32 | ``` 33 | - ### do not round file sizes up to the next full block; this is the default for non-regular files 34 | ```bash 35 | $ shred -x, --exact 36 | ``` 37 | 38 | 39 | --- 40 | 41 | ## Reporting Bugs 42 | Report shred bugs to bug-coreutils@gnu.org 43 | GNU coreutils home page: 44 | General help using GNU software: 45 | Report shred translation bugs to 46 | 47 | --- 48 | 49 | ## Author 50 | 51 | - Colin Plumb 52 | --- 53 | 54 | ## Copyright 55 | Copyright © 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . 56 | This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. 57 | -------------------------------------------------------------------------------- /commands/useradd/README.md: -------------------------------------------------------------------------------- 1 | # useradd 2 | To create new user 3 | ## Description 4 | Create the new user 5 | 6 | ## Syntax 7 | ```useradd [OPTIONS] USERNAME``` 8 | ## Optional Flags 9 | - ### -m 10 | Use the -m (--create-home) option to create the user home directory as /home/username: 11 | ```sudo useradd -m username``` 12 | 13 | - ### -u 14 | In Linux and Unix-like operating systems, users are identified by unique UID and username. 15 | By default, when a new user is created, the system assigns the next available UID from the range of user IDs specified in the login.defs file. 16 | Invoke useradd with the -u (--uid) option to create a user with a specific UID. 17 | 18 | ```sudo useradd -u 1500 username``` 19 | - ### -g 20 | The -g (--gid) option allows you to create a user with a specific initial login group. You can specify either the group name or the GID number. The group name or GID must already exist. 21 | ```sudo useradd -g users username``` 22 | - ### -G 23 | To create user and assign the multiple group 24 | ```sudo useradd -g users -G wheel,developers username``` 25 | - ### -D 26 | The default useradd options can be viewed and changed using the -D, --defaults option, or by manually editing the values in the /etc/default/useradd file. 27 | ```useradd -D``` 28 | - ### -r 29 | To create the system user use r flag 30 | ```sudo useradd -r username``` 31 | - ### -e 32 | To create the user with expire Date 33 | ```sudo useradd -e 2019-01-22 username``` 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /commands/history/README.md: -------------------------------------------------------------------------------- 1 | # history 2 | 3 | Display the history of commands executed. 4 | 5 | --- 6 | 7 | 8 | ## Description 9 | It is a Linux command that displays a list of previously executed commands in the current shell session, 10 | providing a chronological record of command history for reference and reuse. 11 | 12 | --- 13 | 14 | 15 | ## Syntax 16 | 17 | ```bash 18 | history [options] 19 | ``` 20 | --- 21 | 22 | 23 | ## Options/Flags 24 | - ### -c 25 | Clear the history list by deleting all of the entries. 26 | ```bash 27 | $ history -c 28 | ``` 29 | - ### -d 30 | Delete the history entry at offset OFFSET. 31 | ```bash 32 | $ history -d OFFSET 33 | ``` 34 | - ### -a 35 | Append history lines from this session to the history file. 36 | ```bash 37 | $ history –a 38 | ``` 39 | - ### -n 40 | Read all history lines not already read from the history file. 41 | ```bash 42 | $ history -n 43 | ``` 44 | - ### -r 45 | Read the history file and append the contents to the history list. 46 | ```bash 47 | $ history -r 48 | ``` 49 | - ### -w 50 | Write the current history to the history file and append it to the history list 51 | ```bash 52 | $ history -w 53 | ``` 54 | 55 | --- 56 | 57 | 58 | ## Exit Status 59 | 60 | - **0** = The command executed successfully. 61 | 62 | --- 63 | 64 | 65 | ## Copyright 66 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later.
67 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 68 | -------------------------------------------------------------------------------- /commands/rmdir/README.md: -------------------------------------------------------------------------------- 1 | # rmdir 2 | Remove empty directories. 3 | 4 | --- 5 | 6 | ## Description 7 | Remove the DIRECTORY(ies), if they are empty. 8 | 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | $ rmdir [option] [directory] 14 | ``` 15 | 16 | --- 17 | 18 | ## Options/Flags 19 | - ### --ignore-fail-on-non-empty: 20 | #### Ignore each failure that is solely because a directory is non-empty. 21 | ```bash 22 | $ rmdir --ignore-fail-on-non-empty [directory_name] 23 | ``` 24 | - ### -p, --parents: 25 | #### Remove DIRECTORY and its ancestors. 26 | ```bash 27 | $ rmdir -p [directory_name] 28 | ``` 29 | - ### -v, --verbose: 30 | #### Output a diagnostic for every directory processed. 31 | ```bash 32 | $ rmdir -v [directory_name] 33 | ``` 34 | - ### --help: 35 | #### Print a short help text and exit. 36 | ```bash 37 | $ rmdir --help 38 | ``` 39 | - ### --version: 40 | #### Output version information and exit. 41 | ```bash 42 | $ rmdir --version 43 | ``` 44 | 45 | --- 46 | 47 | ## Exit Status 48 | - **0** = The command executed successfully and all requested changes were made. 49 | - **1** = An error occurred or the directory was not empty (if --ignore-fail-on-non-empty is not used). 50 | 51 | --- 52 | 53 | 54 | ## Author 55 | - Ken Thompson 56 | - Dennis Ritchie 57 | 58 | --- 59 | 60 | ## Copyright 61 | Copyright © 2022 Free Software Foundation, Inc.
62 | License GPLv3+: GNU GPL version 3 or later.
63 | https://gnu.org/licenses/gpl.html
64 | This is free software: you are free to change and redistribute it.
65 | There is NO WARRANTY, to the extent permitted by law.
66 | 67 | --- 68 | -------------------------------------------------------------------------------- /commands/mkdir/README.md: -------------------------------------------------------------------------------- 1 | # mkdir 2 | mkdir - make directories 3 | 4 | --- 5 | 6 | ## Description 7 | Create the DIRECTORY(ies), if they do not already exist. 8 | Mandatory arguments to long options are mandatory for short options too. 9 | 10 | --- 11 | 12 | ## Syntax 13 | ```bash 14 | mkdir [OPTION]... DIRECTORY... 15 | ``` 16 | --- 17 | 18 | ## Options/Flags 19 | - ### set file mode (as in chmod), not a=rwx - umask 20 | ```bash 21 | $ mkdir -m, --mode=MODE 22 | ``` 23 | - ### no error if existing, make parent directories as needed 24 | ```bash 25 | $ mkdir -p, --parents 26 | ``` 27 | - ### print a message for each created directory 28 | ```bash 29 | $ mkdir -v, --verbose 30 | ``` 31 | - ### set SELinux security context of each created directory to the default type 32 | ```bash 33 | $ mkdir -Z 34 | ``` 35 | - ### like -Z, or if CTX is specified then set the SELinux or SMACK security context to CTX 36 | ```bash 37 | $ mkdir --context[=CTX] 38 | ``` 39 | - ### output version information and exit 40 | ```bash 41 | $ mkdir --version 42 | ``` 43 | 44 | --- 45 | 46 | ## Reporting Bugs 47 | GNU coreutils online help: 48 | Report any translation bugs to 49 | 50 | --- 51 | 52 | ## Author 53 | 54 | - David MacKenzie 55 | 56 | --- 57 | 58 | ## Copyright 59 | Copyright © 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or 60 | later . 61 | This is free software: you are free to change and redistribute it. There is NO WAR‐ 62 | RANTY, to the extent permitted by law. 63 | -------------------------------------------------------------------------------- /commands/lpr/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | 3 | lpr 4 | 5 | --- 6 | 7 | ## Description 8 | 9 | - Fullform: Line Printer Remote/Line Printer Deamon. 10 | - Used to print files from the Linux command line. 11 | - It uses a spooling daemon to print the named file when facilities become available. 12 | - If no files are specified, the `lpr` command reads from standard input. 13 | 14 | --- 15 | 16 | ## Syntax 17 | 18 | ```bash 19 | $ lpr [OPTIONS] [FILE]... 20 | ``` 21 | 22 | --- 23 | 24 | ## Options/Flags 25 | 26 | - ### -P: 27 | Specifies the printer that you want to print to. 28 | ```bash 29 | $ lpr -P printerName myfile.txt 30 | ``` 31 | - ### -h: 32 | Disables banner printing. 33 | ```bash 34 | $ lpr -h myfile.txt 35 | ``` 36 | - ### -l: 37 | Specifies that the print file is already formatted for the destination and should be sent without filtering. 38 | ```bash 39 | $ lpr -l myfile.txt 40 | ``` 41 | - ### -#: 42 | Sets the number of copies that you want to print. 43 | ```bash 44 | $ lpr -# 3 myfile.txt 45 | ``` 46 | - ### -o page-ranges: 47 | Prints only specific pages, in this example, pages 1 to 3 and page 7. 48 | ```bash 49 | $ lpr -o page-ranges=1-3,7 50 | ``` 51 | 52 | --- 53 | 54 | ## Exit Status 55 | 56 | - **0** = Success 57 | - **1** = The file could not be opened. 58 | - **2** = The file could not be printed. 59 | - **3** = The printer is not available. 60 | - **4** = The print job was canceled. 61 | - **5** = There was an error with the printer queue. 62 | - **6** = The print job was aborted. 63 | - **7** = The print job was held. 64 | - **8** = The print job was deleted. 65 | - **9** = The print job was paused. 66 | - **10** = The print job was resumed. 67 | 68 | --- 69 | -------------------------------------------------------------------------------- /commands/pstree/README.md: -------------------------------------------------------------------------------- 1 | # pstree 2 | Shows the running process as tree. 3 | 4 | 5 | --- 6 | 7 | ## Description 8 | pstree command in Linux that shows the running processes as a tree which is a more convenient way to display the processes hierarchy and makes the output more visually appealing. 9 | 10 | --- 11 | 12 | ## Syntax 13 | ```bash 14 | pstree [options] {pid or username} 15 | ``` 16 | --- 17 | 18 | ## Options/Flags 19 | - ### To display process tree 20 | ```bash 21 | $ pstree 22 | ``` 23 | - ### To include command line arguments in output 24 | ```bash 25 | $ pstree -a 26 | ``` 27 | - ### To display PIDs 28 | ```bash 29 | $ pstree -p 30 | ``` 31 | - ### To force pstree to expand identical subtrees in output. 32 | ```bash 33 | $ pstree -c 34 | ``` 35 | - ### To sort processes wrt PIDs 36 | ```bash 37 | $ pstree -n 38 | ``` 39 | - ### To see who is the owner/user of a process 40 | ```bash 41 | $ pstree -u 42 | ``` 43 | - ### To highlight the current process or any other process 44 | ```bash 45 | $ pstree -h 46 | ``` 47 | - ### To show process group IDs in output 48 | ```bash 49 | $ pstree -g 50 | ``` 51 | - ### To make pstree display process tree specific to a user. 52 | ```bash 53 | $ pstree {username} 54 | ``` 55 | - ### To display version information 56 | ```bash 57 | $ pstree -v 58 | ``` 59 | --- 60 | 61 | ## Author 62 | Werner Almesberger 63 | Craig Small 64 | 65 | --- 66 | 67 | ## Copyright 68 | Copyright © 2020 Free Software Foundation, Inc. License GPLv3+: 69 | GNU GPL version 3 or later . 70 | This is free software: you are free to change and redistribute 71 | it. There is NO WARRANTY, to the extent permitted by law. -------------------------------------------------------------------------------- /commands/su/README.md: -------------------------------------------------------------------------------- 1 | # su 2 | substitute user or switch user 3 | 4 | --- 5 | 6 | ## Description 7 | - It is used to execute commands with the privileges of another user account, by default the root user. 8 | - It can duplicate the functionality of sudo by use of the –c option to pass a single command to the shell. 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | su [options] [username [arguments]] 14 | ``` 15 | --- 16 | 17 | ## Flags/options 18 | - ### -c or --command [command] (Runs a specific command as the specified user) 19 | ```bash 20 | $ su –c [command] 21 | $ su –command [command] 22 | ``` 23 | - ### - or -l or --login [username] (Runs a login script to change to a specific username) 24 | ```bash 25 | $ su - [other_user] 26 | $ su –l [other_user] 27 | $ su –login [other_user] 28 | ``` 29 | - ### -s or --shell [shell] (Allows you to specify a different shell environment to run in) 30 | ```bash 31 | $ su -s [shell] 32 | $ su --shell [shell] 33 | ``` 34 | - ### -h or --help (Show the help file for the su command) 35 | ```bash 36 | $ su -h 37 | $ su --help 38 | ``` 39 | - ### –p or ––preserve–environment (Preserve the shell environment (HOME, SHELL, USER, LOGNAME)) 40 | ```bash 41 | $ su -p 42 | $ su ––preserve–environment 43 | ``` 44 | - ### Username 45 | ```bash 46 | $ su [username] 47 | ``` 48 | - ### Switch to root user 49 | ```bash 50 | $ sudo su - 51 | ``` 52 | --- 53 | 54 | ## Original author 55 | - David MacKenzie 56 | 57 | --- 58 | 59 | ## Copyright 60 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later. 61 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 62 | -------------------------------------------------------------------------------- /commands/pidOf/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | 3 | pidof 4 | 5 | --- 6 | 7 | ## Description 8 | - process id of 9 | - It finds the process id's (pids) of the named running process. 10 | - It prints those id's on the standard input. 11 | 12 | --- 13 | 14 | ## Syntax 15 | ```bash 16 | $ pidof [options] program1 program2 .... programN 17 | ``` 18 | --- 19 | 20 | ## Flags 21 | - ### -s 22 | Single shot - Instructs the program to display only 1 pid. 23 | ```bash 24 | $ pidof -s program_name 25 | ``` 26 | - ### -o 27 | Excludes a process with a given pid from the command output. 28 | ```bash 29 | $ pidof -o pid program_name 30 | ``` 31 | - ### -c 32 | Returns the pids of the processes that are running with the same root directory. 33 | ```bash 34 | $ pidof -c pid program_name 35 | ``` 36 | - ### -q 37 | Quiet mode, suppresses any output and only sets the exit status accordingly. 38 | ```bash 39 | $ pidof -q process_name 40 | ``` 41 | - ### -x 42 | Scripts too - this causes the program to also return process id's of shells running the named scripts. 43 | ```bash 44 | $ pidof -x 45 | ``` 46 | - ### -z 47 | Tells `pidof` to try to detect the sleeping and zombie processes, at the risk of failing or hanging. 48 | ```bash 49 | $ pidof -z 50 | ``` 51 | --- 52 | 53 | ## Exit Status 54 | - **0** = Atleast one program was found with the requested name. 55 | - **1** = No program was found with the requested name. 56 | --- 57 | 58 | ## Author 59 | - [Jaromir Capik](jcapik@redhat.com) 60 | 61 | --- 62 | 63 | ## Copyright 64 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later.
65 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 66 | -------------------------------------------------------------------------------- /commands/echo/README.md: -------------------------------------------------------------------------------- 1 | # echo 2 | echo - display a line of text 3 | 4 | --- 5 | 6 | ## Description 7 | Echo the STRING(s) to standard output. 8 | 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | echo [SHORT-OPTION] [STRING] 14 | echo LONG-OPTION 15 | ``` 16 | --- 17 | 18 | ## Options/Flags 19 | - ### Do not output the trailing newline. 20 | ```bash 21 | $ echo -n [STRING] 22 | ``` 23 | - ### Enable interpretation of backslash escapes. 24 | ```bash 25 | $ echo -e [STRING] 26 | ``` 27 | - ### Disable interpretation of backslash escapes (default) 28 | ```bash 29 | $ echo -E [STRING] 30 | ``` 31 | - ### Display this help and exit 32 | ```bash 33 | $ echo --help 34 | ``` 35 | - ### output version information and exit 36 | ```bash 37 | $ echo --version 38 | ``` 39 | - ### If -e is in effect, the following sequences are recognized: 40 | ```bash 41 | \\ backslash 42 | 43 | \a alert (BEL) 44 | 45 | \b backspace 46 | 47 | \c produce no further output 48 | 49 | \e escape 50 | 51 | \f form feed 52 | 53 | \n new line 54 | 55 | \r carriage return 56 | 57 | \t horizontal tab 58 | 59 | \v vertical tab 60 | ``` 61 | --- 62 | 63 | ## Author 64 | - Brian Fox 65 | - Chet Ramey 66 | 67 | --- 68 | 69 | ## REPORTING BUGS 70 | - GNU coreutils online help: 71 | 72 | - Report any translation bugs to 73 | 74 | 75 | --- 76 | 77 | ## Copyright 78 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later. 79 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 80 | -------------------------------------------------------------------------------- /commands/look/README.md: -------------------------------------------------------------------------------- 1 | ## look 2 | 3 | Display lines beginning with a given string. 4 | 5 | --- 6 | 7 | ## Description 8 | 9 | - The look utility displays any lines in a file that contain a string as a prefix. As `look` performs a binary search, the lines in the file must be sorted (where sort(1) was given the same options `-d` and/or `-f` that look is invoked with). 10 | - If a file is not specified, then the file `/usr/share/dict/words` is used, only alphanumeric characters are compared and the case of alphabetic characters is ignored. 11 | 12 | --- 13 | 14 | ## Syntax 15 | 16 | ```bash 17 | $ look [options] string [file] 18 | ``` 19 | --- 20 | 21 | ## Options/Flags 22 | 23 | - ### -a, --alternative 24 | Use the alternative dictionary file. 25 | ```bash 26 | $ look -a string 27 | ``` 28 | 29 | - ### -d, --alphanum 30 | Use normal dictionary character set and order, i.e. only blanks and alphanumeric characters are compared. This is on by default if no file is specified. 31 | ```bash 32 | $ look -d string 33 | ``` 34 | 35 | - ### -f, --ignore-case 36 | Ignore the case of alphabetic characters. This is on by default if no file is specified. 37 | ```bash 38 | $ look -f string 39 | ``` 40 | 41 | - ### -t, --terminate character 42 | Specify a string termination character, i.e. only the characters in the string up to and including the first occurrence of character are compared. 43 | ```bash 44 | $ look -t= character string 45 | ``` 46 | 47 | - ### -h, --help 48 | Display help text and exit. 49 | ```bash 50 | $ look -h 51 | ``` 52 | 53 | --- 54 | 55 | ## Exit Status 56 | - **0:** The command executed successfully, and lines beginning with the specified string were found. 57 | - **1:** No lines beginning with the specified string were found. 58 | - **>1:** An error occurred. 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /commands/find/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | 3 | find 4 | 5 | --- 6 | 7 | ## Description 8 | 9 | - Used to find files as well as directories and perform subsequent operations on them. 10 | - It supports searching by file, folder, name, creation date, modification date, owner and permissions. 11 | 12 | --- 13 | 14 | ## Syntax 15 | 16 | ```bash 17 | find [where to start searching from] 18 | [expression determines what to find] [-options] [what to find] 19 | ``` 20 | 21 | --- 22 | 23 | ## Symbols used to specify the directory 24 | 25 | - `.` : For current directory name. 26 | - `/` : For the root directory. 27 | 28 | ## Options/Flags 29 | 30 | - ### -name _pattern_: 31 | To check that the file name is the same as the given shell-glob pattern or not. 32 | ```bash 33 | $ find . -name "*.txt" 34 | ``` 35 | - ### -type _type_: 36 | To specify the file type. 37 | ```bash 38 | $ find . -type d -name "*.bak" 39 | ``` 40 | - ### -delete: 41 | To find and delete a specific file. 42 | ```bash 43 | $ find . -name myfile.txt -delete 44 | ``` 45 | - ### -mtime: 46 | To find the files by modification, followed by the number of days. 47 | ```bash 48 | $ find ./MyDirectory -mtime -1 49 | ``` 50 | - ### -perm: 51 | To find files by permission. 52 | ```bash 53 | $ find ./MyDirectory -perm 777 54 | ``` 55 | 56 | --- 57 | 58 | ## Exit Status 59 | 60 | - **0** = Successful execution 61 | - **non-zero value** = Error Occurrence 62 | 63 | --- 64 | 65 | ## Author 66 | 67 | - Eric Decker 68 | 69 | ### Later enhanced by 70 | 71 | - David MacKenzie 72 | - Jay Plett 73 | - Tim Wood 74 | 75 | --- 76 | 77 | ## Copyright 78 | 79 | Copyright © 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later.
80 | This is free software, you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. 81 | 82 | --- 83 | -------------------------------------------------------------------------------- /commands/zip/README.md: -------------------------------------------------------------------------------- 1 | # zip 2 | Compress a file 3 | 4 | --- 5 | 6 | ## Description 7 | It is used to compress a file, allows us to create an archive of files and directories. 8 | It is used when you have a limited bandwidth between two servers and want to transfer the files faster then zip the files and transfer. 9 | 10 | --- 11 | 12 | ## Syntax 13 | ```bash 14 | zip [options] zipfile files_list 15 | Ex: zip myfile.zip filename.txt 16 | ``` 17 | --- 18 | 19 | ## Options/Flags 20 | - ### -d 21 | Removes the file from the zip archive 22 | ```bash 23 | $ zip –d filename.zip file.txt 24 | ``` 25 | - ### -u 26 | Used to update the specified list of files or add new files to the existing zip file. 27 | ```bash 28 | $ zip –u filename.zip file.txt 29 | ``` 30 | - ### -m 31 | Deletes the original file after zipping. 32 | ```bash 33 | $ zip –m filename.zip file.txt 34 | ``` 35 | - ### -r 36 | Helps to zip all the files present in the specified directory. 37 | ```bash 38 | $ zip –r filename.zip directory_name 39 | ``` 40 | - ### -x 41 | Used to exclude some unwanted files while creating a zip archive of a directory. 42 | ```bash 43 | $ zip –x filename.zip file_to_be_excluded 44 | ``` 45 | - ### -e 46 | Used to create basic password protected ZIP files i.e to encrypt a zip file with password. 47 | Below command will prompt user to enter a password and verify it. 48 | ```bash 49 | $ zip –e filename.zip file.txt 50 | ``` 51 | 52 | --- 53 | 54 | ## Exit Status 55 | - **0** = OK 56 | - **2** = The zipfile is either truncated or damaged 57 | - **3** = The structure of the zipfile is invalid 58 | - **4** = Unable to allocate sufficient memory to complete the command 59 | - **9** = Zip was interrupted by user (or superuser) action 60 | --- 61 | 62 | ## Author 63 | - Phil Katz 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /commands/alias/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | 3 | alias 4 | 5 | --- 6 | 7 | ## Description 8 | 9 | - `alias` command instructs the shell to replace one string with another string while executing the commands. 10 | - When we often have to use a single big command multiple times, in those cases, we create something called as _**alias**_ for that command. 11 | - `alias` is like a shortcut command which will have same functionality as if we are writing the whole command. 12 | 13 | --- 14 | 15 | ## Syntax 16 | 17 | ```bash 18 | $ alias [-p] [name[=value] ... ] 19 | ``` 20 | 21 | --- 22 | 23 | ## Options/Flags 24 | 25 | - ### Creating an Alias 26 | 27 | ```bash 28 | $ alias name="value" 29 | ``` 30 | 31 | - ### Creating an Unalias (Removing an existing alias) 32 | 33 | ```bash 34 | $ unalias [alias name] 35 | ``` 36 | 37 | - ### -p 38 | Lists all of the aliases that are currently defined in the shell. 39 | ```bash 40 | $ alias -p 41 | ``` 42 | - ### --help 43 | It displays help Information. 44 | ```bash 45 | $ alias --help 46 | ``` 47 | 48 | --- 49 | 50 | ## How to permanently store aliases across sessions? 51 | 52 | - We can store aliases in shell configuration files. 53 | - For example for Bash Shell, we can write in `~/.bashrc`. 54 | - Let us suppose we want to make an alias of changing to Documents directory as `CD`. For that go in the `.bashrc` file and write: 55 | 56 | ```bash 57 | $ alias CD="cd Documents" 58 | ``` 59 | 60 | --- 61 | 62 | ## Note 63 | 64 | There must not be space before and after the '=' sign in the command. 65 | 66 | --- 67 | 68 | ## Author 69 | 70 | - Bill Joy 71 | 72 | --- 73 | 74 | ## Copyright 75 | 76 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later.
77 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 78 | -------------------------------------------------------------------------------- /commands/kill/README.md: -------------------------------------------------------------------------------- 1 | # kill 2 | send a signal to a process 3 | 4 | --- 5 | 6 | ## Description 7 | The default signal for kill is TERM. Use -l or -L to list available signals. Particularly useful signals include HUP, INT, KILL, STOP, CONT, and 0. 8 | Alternate signals may be specified in three ways: -9, -SIGKILL or -KILL. Negative PID values may be used to choose whole process groups; see the 9 | PGID column in ps command output. A PID of -1 is special; it indicates all processes except the kill process itself and init. 10 | 11 | --- 12 | 13 | ## Syntax 14 | ```bash 15 | $ kill 16 | or 17 | $ kill [options] [...] 18 | ``` 19 | 20 | --- 21 | 22 | ## Options/Flags 23 | - ### [...] 24 | pid is process id. 25 | ```bash 26 | $ kill 27 | ``` 28 | - ### - 29 | ```bash 30 | $ kill - 31 | ``` 32 | - ### -q, --queue value 33 | ```bash 34 | $ kill 35 | ``` 36 | - ### -l, --list [signal] 37 | ```bash 38 | $ kill -l 39 | or 40 | $ kill --list 41 | ``` 42 | - ### -L, --table 43 | List signal names in a nice table. 44 | ```bash 45 | $ kill -L 46 | or 47 | $ kill --table 48 | ``` 49 | 50 | ## Examples 51 | EXAMPLES 52 | ```bash 53 | $ kill -9 -1 54 | ``` 55 | Kill all processes you can kill. 56 | ```bash 57 | kill -l 11 58 | ``` 59 | Translate number 11 into a signal name. 60 | 61 | ```bash 62 | kill -L 63 | ``` 64 | List the available signal choices in a nice table. 65 | 66 | ```bash 67 | kill 123 543 2341 3453 68 | ``` 69 | Send the default signal, SIGTERM, to all those processes. 70 | 71 | ## AUTHOR 72 | Albert Cahalan ⟨albert@users.sf.net⟩ wrote kill in 1999 to replace a bsdutils one that was not standards compliant. The util-linux one might also 73 | work correctly -------------------------------------------------------------------------------- /commands/ip/README.md: -------------------------------------------------------------------------------- 1 | # ip 2 | Internet Protocol 3 | 4 | --- 5 | 6 | ## Description 7 | perform several tasks like assigning an address to a network interface or configuring network interface parameters. 8 | 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | $ ip [ OPTIONS ] OBJECT { COMMAND | help } 14 | ``` 15 | --- 16 | 17 | ## Options/Flags 18 | - ### show all IP addresses associated on all network devices. 19 | ```bash 20 | $ ip address 21 | ``` 22 | - ### Show information of particular interface. 23 | ```bash 24 | $ ip address show (interface) 25 | ``` 26 | - ### display link layer information 27 | ```bash 28 | $ ip link 29 | ``` 30 | - ### show the statistics of the various network interfaces. 31 | ```bash 32 | $ ip -s link 33 | ``` 34 | - ### helps you to see the route packets your network will take as set in your routing table. 35 | ```bash 36 | $ ip route 37 | ``` 38 | - ### assign an IP address to an interface. 39 | ```bash 40 | $ ip a add (ip_address) dev interface 41 | ``` 42 | - ### delete an assigned IP address to an interface. 43 | ```bash 44 | $ ip a del (ip_address) dev interface 45 | ``` 46 | - ### enable a network interface. 47 | ```bash 48 | $ ip link set (interface) up 49 | ``` 50 | - ### disable a network interface 51 | ```bash 52 | $ ip link set (interface) down 53 | ``` 54 | 55 | - ### monitor and displays the state of devices, addresses and routes continuously. 56 | ```bash 57 | $ ip monitor 58 | ``` 59 | 60 | --- 61 | 62 | ## Exit Status 63 | - **0** = OK 64 | - **1** = Syntax error 65 | - **2** = Kernel error 66 | --- 67 | 68 | ## Author 69 | - Alexey N. Kuznetsov 70 | 71 | 72 | --- 73 | 74 | ## Copyright 75 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later. 76 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 77 | -------------------------------------------------------------------------------- /commands/uname/README.md: -------------------------------------------------------------------------------- 1 | # uname 2 | print system information 3 | 4 | --- 5 | 6 | ## Description 7 | Print certain system information. 8 | 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | $ uname 14 | ``` 15 | 16 | --- 17 | 18 | ## Options/Flags 19 | - ### -a, -all 20 | print all information, in the following order, except omit -p and -i if unknown: 21 | ```bash 22 | $ uname -a 23 | or 24 | $ uname -all 25 | ``` 26 | - ### -s, --kernel-name 27 | print the kernel name 28 | ```bash 29 | $ uname -s 30 | or 31 | $ uname --kernel-name 32 | ``` 33 | - ### -n, --nodename 34 | print the network node hostname 35 | ```bash 36 | $ uname -n 37 | or 38 | $ uname --nodename 39 | ``` 40 | - ### -r, --kernel-release 41 | print the kernel release 42 | ```bash 43 | $ uname -r 44 | or 45 | $ uname --kernel-release 46 | ``` 47 | - ### -v, --kernel-version 48 | print the kernel version 49 | ```bash 50 | $ uname -v 51 | ``` 52 | - ### -m, --machine 53 | print the machine hardware name 54 | ```bash 55 | $ uname -m 56 | or 57 | $ uname -machine 58 | ``` 59 | 60 | - ### -p, --processor 61 | print the processor type (non-portable) 62 | ```bash 63 | $ uname -p 64 | or 65 | $ uname --processor 66 | ``` 67 | - ### -i, --hardware-platform 68 | print the hardware platform (non-portable) 69 | ```bash 70 | $ uname -i 71 | or 72 | $ uname --hardware-platform 73 | ``` 74 | - ### -o, --operating-system 75 | print the operating system 76 | ```bash 77 | $ uname -o 78 | or 79 | $ uname --operating-system 80 | ``` 81 | - ### --help 82 | display this help and exit 83 | ```bash 84 | $ uname --help 85 | ``` 86 | - ### --version 87 | output version information and exit 88 | ```bash 89 | $ uname --version 90 | ``` 91 | ### Main AUTHOR 92 | Written by David MacKenzie. 93 | 94 | -------------------------------------------------------------------------------- /commands/cut/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | 3 | cut 4 | 5 | --- 6 | 7 | ## Description 8 | 9 | - Used to cut out the sections from each line of files and write the result to standard output. 10 | - It can be used to cut parts of a line by byte position, character and field. 11 | 12 | --- 13 | 14 | ## Syntax 15 | 16 | ```bash 17 | cut [OPTION]... [FILE]... 18 | ``` 19 | 20 | --- 21 | 22 | ## Options/Flags 23 | 24 | - ### -b: 25 | 26 | - To extract the specific bytes, you need to follow `-b` option with the list of byte numbers separated by `,`. 27 | 28 | - List without ranges: 29 | ```bash 30 | $ cut -b 1,2,3 myfile.txt 31 | ``` 32 | - List with ranges: 33 | ```bash 34 | $ cut -b 1-3,5-7 myfile.txt 35 | ``` 36 | 37 | - It uses a special form for selecting bytes from the beginning upto the end of the line. 38 | 39 | - In this, 1- indicates from the 1st byte to the end byte of a line: 40 | ```bash 41 | $ cut -b 1- myfile.txt 42 | ``` 43 | - In this, -3 indicates from the 1st byte to the 3rd byte of a line: 44 | ```bash 45 | $ cut -b -3 myfile.txt 46 | ``` 47 | 48 | - ### -c: 49 | 50 | - To cut by character use the -c option. 51 | 52 | - List without ranges: 53 | ```bash 54 | $ cut -c 2,5,7 myfile.txt 55 | ``` 56 | - List with ranges: 57 | ```bash 58 | $ cut -c 1-3,5-7 myfile.txt 59 | ``` 60 | 61 | - Cut uses a special form for selecting characters from the beginning upto the end of the line. 62 | 63 | - In this, 1- indicate from 1st character to the end character of a line: 64 | ```bash 65 | $ cut -c 1- myfile.txt 66 | ``` 67 | - In this, -5 indicates from the 1st character to the 5th character of a line: 68 | ```bash 69 | $ cut -b -5 myfile.txt 70 | ``` 71 | 72 | - ### -f: 73 | 74 | - Used for fixed-length lines. 75 | 76 | ```bash 77 | $ cut -f 1 myfile.txt 78 | ``` 79 | 80 | --- 81 | 82 | ## Exit Status 83 | 84 | - **0** = Successful execution 85 | - **non-zero value** = Error Occurrence 86 | 87 | --- 88 | -------------------------------------------------------------------------------- /commands/rm/README.md: -------------------------------------------------------------------------------- 1 | # rm 2 | remove files or directories 3 | 4 | --- 5 | 6 | ## Description 7 | By default, it does not remove directories. 8 | 9 | If the -I or --interactive=once option is given, and there are more than three files 10 | or the -r, -R, or --recursive are given, then rm prompts the user for whether to pro‐ 11 | ceed with the entire operation. If the response is not affirmative, the entire com‐ 12 | mand is aborted. 13 | 14 | Otherwise, if a file is unwritable, standard input is a terminal, and the -f or 15 | --force option is not given, or the -i or --interactive=always option is given, rm 16 | prompts the user for whether to remove the file. If the response is not affirmative, 17 | the file is skipped. 18 | 19 | --- 20 | 21 | ## Syntax 22 | ```bash 23 | rm [OPTION]... [FILE]... 24 | ``` 25 | --- 26 | 27 | ## Options/Flags 28 | - ### ignore nonexistent files and arguments, never prompt. 29 | ```bash 30 | $ rm -f, --force 31 | ``` 32 | - ### prompt before every removal. 33 | ```bash 34 | $ rm -i 35 | ``` 36 | - ### remove directories and their contents recursively. 37 | ```bash 38 | $ rm -r, -R, --recursive 39 | ``` 40 | - ### remove empty directories. 41 | ```bash 42 | $ rm -d, --dir 43 | ``` 44 | - ### explain what is being done. 45 | ```bash 46 | $ rm -v, --verbose 47 | ``` 48 | - ### To remove a file whose name starts with a '-', for example '-foo', use one of these commands: 49 | ```bash 50 | $ rm -- -foo 51 | $ rm ./-foo 52 | ``` 53 | --- 54 | 55 | ## Reporting Bugs 56 | GNU coreutils online help: 57 | Report any translation bugs to 58 | --- 59 | 60 | ## Author 61 | - Richard M. Stallman. 62 | - David MacKenzie. 63 | - Paul Rubin. 64 | - Jim Meyering. 65 | 66 | --- 67 | 68 | ## Copyright 69 | Copyright © 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or 70 | later . 71 | This is free software: you are free to change and redistribute it. There is NO WAR‐ 72 | RANTY, to the extent permitted by law. 73 | -------------------------------------------------------------------------------- /commands/lpc/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | 3 | lpc 4 | 5 | ## Description 6 | 7 | - Fullform: Line Printer Control. 8 | - Used to manage printer queues and printer status within the **_Line Printer Daemon (LPD)_** printing system. 9 | - It allows users to interact with and control printers, print queues, and jobs in a similar fashion to lpq and lprm, but with more advanced capabilities. 10 | 11 | --- 12 | 13 | ## Syntax 14 | 15 | ```bash 16 | $ lpc [command] 17 | ``` 18 | 19 | --- 20 | 21 | ## Commands 22 | 23 | - ### -p 24 | To list available printers. 25 | ```bash 26 | $ lpstat -p 27 | ``` 28 | - ### status: 29 | Displays the status of the specified printer. 30 | ```bash 31 | $ lpc status printer_name 32 | ``` 33 | - ### stop: 34 | Stops the specified printer, preventing new print jobs from being processed. 35 | ```bash 36 | $ lpc stop printer_name 37 | ``` 38 | - ### start: 39 | Starts a stopped printer, allowing it to process print jobs again. 40 | ```bash 41 | $ lpc start printer_name 42 | ``` 43 | - ### abort: 44 | Aborts the current print job being processed by the printer. 45 | ```bash 46 | $ lpc abort printer_name 47 | ``` 48 | - ### disable: 49 | Disables the printer, preventing any print jobs from being accepted. 50 | ```bash 51 | $ lpc disable printer_name 52 | ``` 53 | - ### enable: 54 | Enables a disabled printer, allowing it to accept print jobs again. 55 | ```bash 56 | $ lpc enable printer_name 57 | ``` 58 | - ### exit: 59 | Exits the lpc command interface. 60 | ```bash 61 | $ lpc exit 62 | ``` 63 | 64 | --- 65 | 66 | ## Exit Status 67 | 68 | - **0** = Successful execution 69 | - **non-zero value** = Error Occurrence 70 | 71 | --- 72 | 73 | ## Note 74 | 75 | The availability and behavior of the `lpc` command may vary between different Unix-like systems, depending on the printing subsystem in use. 76 | 77 | --- 78 | 79 | ## Author 80 | 81 | - [Patrick Powell](papowell@lprng.com) 82 | 83 | --- 84 | 85 | ## Copyright 86 | 87 | Copyright © Regents of the University of California. All rights reserved.
88 | This software is provided by the Regents and its contributors "as is" and any express or implied warranties are disclaimed. 89 | 90 | --- 91 | -------------------------------------------------------------------------------- /commands/touch/README.md: -------------------------------------------------------------------------------- 1 | # touch 2 | touch - change file timestamps 3 | 4 | --- 5 | 6 | ## Description 7 | Update the access and modification times of each FILE to the current time. 8 | A FILE argument that does not exist is created empty, unless -c or -h is supplied. 9 | 10 | --- 11 | 12 | ## Syntax 13 | ```bash 14 | touch [OPTION] FILE 15 | ``` 16 | --- 17 | 18 | ## Options/Flags 19 | - ### Change only the access time 20 | ```bash 21 | $ touch -a [FILE] 22 | ``` 23 | - ### Do not create any files 24 | ```bash 25 | $ touch -c [FILE] 26 | ``` 27 | 28 | `OR` 29 | 30 | ```bash 31 | $ touch --no-create [FILE] 32 | ``` 33 | 34 | - ### Parse STRING and use it instead of current time 35 | ```bash 36 | $ touch -d=STRING [FILE] 37 | ``` 38 | 39 | `OR` 40 | 41 | ```bash 42 | $ touch --date=STRING [FILE] 43 | ``` 44 | - ### Change only the modification time 45 | ```bash 46 | $ touch -m [FILE] 47 | ``` 48 | - ### Use this file's times instead of current time 49 | ```bash 50 | $ touch -r=FILE [FILE] 51 | ``` 52 | 53 | `OR` 54 | 55 | ```bash 56 | $ touch --reference=FILE [FILE] 57 | ``` 58 | - ### Use [[CC]YY]MMDDhhmm[.ss] instead of current time 59 | ```bash 60 | $ touch -t STAMP [FILE] 61 | ``` 62 | - ### Display this help and exit 63 | ```bash 64 | $ touch --help 65 | ``` 66 | - ### Output version information and exit 67 | ```bash 68 | $ touch --version 69 | ``` 70 | - ### Note that the -d and -t options accept different time-date formats. 71 | 72 | 73 | --- 74 | 75 | ## REPORTING BUGS 76 | - GNU coreutils online help: 77 | 78 | - Report any translation bugs to 79 | 80 | 81 | --- 82 | 83 | ## Author 84 | - Paul Rubin 85 | - Arnold Robbins 86 | - Jim Kingdon 87 | - David MacKenzie 88 | - Randy Smith 89 | 90 | --- 91 | 92 | ## Copyright 93 | Copyright © 2020 Free Software Foundation, Inc. License GPLv3+: 94 | GNU GPL version 3 or later . 95 | This is free software: you are free to change and redistribute 96 | it. There is NO WARRANTY, to the extent permitted by law. -------------------------------------------------------------------------------- /commands/passwd/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | 3 | passwd 4 | 5 | --- 6 | 7 | ## Description 8 | - `passwd` command in Linux is used to change the user account passwords. 9 | - The root user reserves the privilege to change the password for any user on the system, while a normal user can only change the account password for his or her own account. 10 | 11 | --- 12 | 13 | ## Syntax 14 | ```bash 15 | $ passwd [options] [username] 16 | ``` 17 | 18 | --- 19 | 20 | ## Options/Flags 21 | - ### -d, --delete 22 | Deletes the user password and makes the account password-less. 23 | ```bash 24 | $ passwd -d 25 | ``` 26 | - ### -e, --expire 27 | Immediately expires the account password and forces the user to change the password on their next login. 28 | ```bash 29 | $ passwd -e 30 | ``` 31 | - ### -h, --help 32 | Display help related to the passwd command. 33 | ```bash 34 | $ passwd -h 35 | ``` 36 | - ### -a, --all 37 | Reports password status on all accounts. 38 | ```bash 39 | $ passwd -a 40 | ``` 41 | - ### -k, --keep-tokens 42 | Used when you only want to change the password if it is expired. 43 | ```bash 44 | $ passwd -k 45 | ``` 46 | - ### -l, --lock 47 | Locks the password of user. 48 | ```bash 49 | $ passwd -l 50 | ``` 51 | - ### -q, --quiet 52 | - This option is used for quiet mode. 53 | - While using this option to change a password, the message “Changing password for $user.”, which usually gets printed before changing a password, does not get echoed. 54 | ```bash 55 | $ passwd -q 56 | ``` 57 | - ### -S 58 | - Shows the password status (7 fields) of a user in the following format: 59 | ```bash 60 | $ pratiksha P 11/16/2023 0 99999 7 -1 61 | ``` 62 | 63 | ```bash 64 | $ passwd -S 65 | ``` 66 | - ### -u,--unlock 67 | Unlocks the password of an account. 68 | ```bash 69 | $ passwd -u 70 | ``` 71 | 72 | --- 73 | 74 | ## Author 75 | - Julie Haugh 76 | 77 | --- 78 | 79 | ## Copyright 80 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later.
81 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 82 | -------------------------------------------------------------------------------- /commands/chown/README.md: -------------------------------------------------------------------------------- 1 | # chown 2 | Change the ownership of the file. 3 | 4 | --- 5 | 6 | 7 | ## Description 8 | Used to change the ownership of files and directories, allowing the assignment of new owners and groups. 9 | 10 | --- 11 | 12 | 13 | ## File Ownership 14 | - Each file has an owner (a user) and a group associated with it. 15 | - The owner is usually the user who created the file, and the group may include multiple users. 16 | - File ownership is crucial for determining who can access or modify a file. 17 | 18 | 19 | ### To view ownership of all the files and folders in the directory use the command: 20 | ```bash 21 | $ ls -l 22 | ``` 23 | 24 | ## Syntax 25 | 26 | The chown commands modifies the permissions of the object. 27 | 28 | ```bash 29 | chown [options] new_owner[:new_group] file(s) 30 | ``` 31 | --- 32 | 33 | 34 | ## Options/Flags 35 | - ### -c 36 | Reports when a file change is made. 37 | ```bash 38 | $ chown -c owner_name file1.txt 39 | ``` 40 | - ### -v 41 | It is used to show verbose information for every file processed. 42 | ```bash 43 | $ chown -v owner_name file1.txt 44 | ``` 45 | - ### -f 46 | When you are not permitted to change group permissions and an error occurs, this option forcefully/silently changes the ownership. 47 | ```bash 48 | $ chown -f owner_name file.txt 49 | ``` 50 | - ### --from=user:group 51 | Change the ownership only if the file is currently owned by the specified user and group. 52 | ```bash 53 | $ chown --from=old_owner:old_group new_owner:new_group file.txt 54 | ``` 55 | - ### --reference=file 56 | Use the ownership of another file or directory as a reference. 57 | ```bash 58 | $ chown --reference=reference_file.txt file.txt 59 | ``` 60 | --- 61 | 62 | 63 | ## Exit Status 64 | - **0** = The command executed successfully and all requested changes were made. 65 | - **>0** = An error occurred. 66 | 67 | --- 68 | 69 | 70 | ## Author 71 | - Ken Thompson 72 | - Dennis Ritchie 73 | 74 | 75 | --- 76 | 77 | 78 | ## Copyright 79 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later.
80 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 81 | -------------------------------------------------------------------------------- /commands/ls/README.md: -------------------------------------------------------------------------------- 1 | # ls 2 | list storage 3 | 4 | --- 5 | 6 | ## Description 7 | List information about the FILE(s) of the current directory. 8 | It sorts the files alphabetically if tags are not specified. 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | ls [OPTIONS/FlAGS] [FILE] 14 | ``` 15 | --- 16 | 17 | ## Options/Flags 18 | - ### List files one per line. 19 | ```bash 20 | $ ls -1 21 | ``` 22 | - ### List all files, including hidden files. 23 | ```bash 24 | $ ls -a 25 | ``` 26 | - ### List all files in long listing format. 27 | ```bash 28 | $ ls -l 29 | ``` 30 | - ### List all files with trailing directory names and indicating what type files are by putting a slash after directories and a star after executable files 31 | ```bash 32 | $ ls -F 33 | ``` 34 | - ### List all files with long format, permissions, ownership, size and modification date of all files. 35 | ```bash 36 | $ ls - la 37 | ``` 38 | - ### Long formated list sorted by size in descending order. 39 | ```bash 40 | $ ls -lS 41 | ``` 42 | - ### Long formated list sorted by modification date, oldest being first of all files. 43 | ```bash 44 | $ ls - ltr 45 | ``` 46 | - ### List files with size displayed using human-readable units such as KiB, MiB, GiB. 47 | ```bash 48 | $ ls -h 49 | ``` 50 | - ### List directories only. 51 | ```bash 52 | $ ls -d */ 53 | ``` 54 | 55 | - ### List file entries by column. 56 | ```bash 57 | $ ls -C 58 | ``` 59 | - ### List files with their respective index number. 60 | ```bash 61 | $ ls -i 62 | ``` 63 | `OR` 64 | ```bash 65 | $ ls --inode 66 | ``` 67 | - ### List files by sorting with respect to time, newest first. 68 | ```bash 69 | $ ls -t 70 | ``` 71 | 72 | --- 73 | 74 | ## Exit Status 75 | - **0** = OK 76 | - **1** = Minor problem --> can't access a directory/file. 77 | - **2** = Major problem --> can't access command line arguments. 78 | --- 79 | 80 | ## Author 81 | - Richard M. Stallman 82 | - David MacKenzie. 83 | 84 | --- 85 | 86 | ## Copyright 87 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later. 88 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 89 | -------------------------------------------------------------------------------- /commands/free/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | 3 | free 4 | 5 | --- 6 | 7 | ## Description 8 | `free` displays the total amount of free and used physical and swap memory in the system, as well as the buffers and caches used by the kernel. The information is gathered by parsing __*/proc/meminfo*__. The displayed columns are: 9 | 10 | total Total usable memory (MemTotal and SwapTotal in 11 | /proc/meminfo). This includes the physical and swap memory 12 | minus a few reserved bits and kernel binary code. 13 | 14 | used Used or unavailable memory (calculated as total - 15 | available) 16 | 17 | free Unused memory (MemFree and SwapFree in /proc/meminfo) 18 | 19 | shared Memory used (mostly) by tmpfs (Shmem in /proc/meminfo) 20 | 21 | buffers 22 | Memory used by kernel buffers (Buffers in /proc/meminfo) 23 | 24 | cache Memory used by the page cache and slabs (Cached and 25 | SReclaimable in /proc/meminfo) 26 | 27 | buff/cache 28 | Sum of buffers and cache 29 | 30 | available 31 | Estimation of how much memory is available for starting 32 | new applications, without swapping. Unlike the data 33 | provided by the cache or free fields, this field takes 34 | into account page cache and also that not all reclaimable 35 | memory slabs will be reclaimed due to items being in use 36 | (MemAvailable in /proc/meminfo, available on kernels 3.14, 37 | emulated on kernels 2.6.27+, otherwise the same as free) 38 | --- 39 | 40 | ## Syntax 41 | ```bash 42 | $ free [options] 43 | ``` 44 | --- 45 | 46 | ## Options/Flags 47 | - ### Display the amount of memory in bytes. 48 | ```bash 49 | $ free -b, --bytes 50 | ``` 51 | - ### Display the amount of memory in kibibytes. This is the default. 52 | ```bash 53 | $ free -k, --kibi 54 | ``` 55 | - ### Display the amount of memory in mebibytes. 56 | ```bash 57 | $ free -m, --mebi 58 | ``` 59 | - ### Display the result count times. Requires the -s option. 60 | ```bash 61 | $ free -c, --count 62 | ``` 63 | 64 | 65 | --- 66 | 67 | ## Reporting Bugs 68 | 69 | Send bug reports to 70 | 71 | --- 72 | 73 | ## Author 74 | 75 | - Brian Edmonds 76 | 77 | --- 78 | 79 | -------------------------------------------------------------------------------- /commands/curl/README.md: -------------------------------------------------------------------------------- 1 | # curl 2 | 3 | Transfer data with URLs. 4 | 5 | --- 6 | 7 | 8 | ## Description 9 | It is a command-line tool for making HTTP requests, allowing data transfer between a client and a server, 10 | supporting a wide range of protocols and options for file transfer and interaction with APIs. 11 | 12 | --- 13 | 14 | 15 | ## Syntax 16 | 17 | ```bash 18 | curl [options] [URL...] 19 | ``` 20 | --- 21 | 22 | 23 | ## Options/Flags 24 | - ### -o 25 | Saves the downloaded file on the local machine with the name provided in the parameters. 26 | ```bash 27 | $ curl -o [file_name] [URL...] 28 | ``` 29 | - ### -C 30 | This option resumes download which has been stopped due to some reason. This is useful when downloading large files and was interrupted. 31 | ```bash 32 | $ curl -C - [URL...] 33 | ``` 34 | - ### --limit-rate 35 | This option limits the upper bound of the rate of data transfer and keeps it around the given value in bytes. 36 | ```bash 37 | $ curl --limit-rate [value] [URL...] 38 | ``` 39 | - ### -u 40 | curl also provides options to download files from user-authenticated FTP servers. 41 | ```bash 42 | $ curl -u {username}:{password} [FTP_URL] 43 | ``` 44 | - ### -T 45 | This option helps to upload a file to the FTP server. 46 | ```bash 47 | $ curl -u {username}:{password} -T {filename} {FTP_Location} 48 | ``` 49 | - ### -x 50 | curl also lets us use a proxy to access the URL. 51 | ```bash 52 | $ curl -x [proxy_name]:[port] [URL...] 53 | ``` 54 | 55 | --- 56 | 57 | 58 | ## Exit Status 59 | 60 | - **0**: Successful operation 61 | - **1**: Unsupported protocol 62 | - **2**: Failed initialization 63 | - **3**: URL malformed 64 | - **4**: URL access denied 65 | - **5**: Couldn't resolve proxy 66 | - **6**: Couldn't resolve host 67 | - **7**: Failed to connect to host 68 | - **8**: FTP weird server reply 69 | - **9**: FTP access denied 70 | - **22**: HTTP page not retrieved 71 | - **26**: Read error 72 | - **27**: Out of memory 73 | - **28**: Operation timeout 74 | - **35**: SSL connect error 75 | 76 | --- 77 | 78 | 79 | ## Author 80 | - Daniel Stenberg 81 | --- 82 | 83 | 84 | ## Copyright 85 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later.
86 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 87 | -------------------------------------------------------------------------------- /commands/netstat/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | 3 | netstat 4 | 5 | --- 6 | 7 | ## Description 8 | - Network statistics. 9 | - Netstat command displays various network-related information such as network connections, routing tables, interface statistics, etc. 10 | 11 | --- 12 | 13 | ## Syntax 14 | ```bash 15 | $ netstat 16 | ``` 17 | 18 | --- 19 | 20 | ## Options/Flags 21 | - ### -a 22 | Represents every socket, both non-listening and listening, and every protocol, like UDP, TCP, etc. 23 | ```bash 24 | $ netstat -a 25 | ``` 26 | - ### -at 27 | Represents TCP connections only. 28 | ```bash 29 | $ netstat -at 30 | ``` 31 | - ### -au 32 | Represents UDP connections only. 33 | ```bash 34 | $ netstat -au 35 | ``` 36 | - ### -al 37 | Displays listening sockets only. 38 | ```bash 39 | $ netstat -al 40 | ``` 41 | - ### -lt 42 | Lists only the listening TCP ports. 43 | ```bash 44 | $ netstat -lt 45 | ``` 46 | - ### -lu 47 | Lists only the listening UDP ports. 48 | ```bash 49 | $ netstat -lu 50 | ``` 51 | - ### -lx 52 | Lists only the listening Unix ports. 53 | ```bash 54 | $ netstat -lx 55 | ``` 56 | - ### -s 57 | To list the statistics for all ports. 58 | ```bash 59 | $ netstat -s 60 | ``` 61 | - ### -pt 62 | To display the PID and program names. 63 | ```bash 64 | $ netstat -pt 65 | ``` 66 | - ### -c 67 | To print the netstat information continuously. 68 | ```bash 69 | $ netstat -c 70 | ``` 71 | - ### --verbose 72 | To get the non-supportive address families in the system. 73 | ```bash 74 | $ netstat --verbose 75 | ``` 76 | - ### -r 77 | To get the kernel routing information. 78 | ```bash 79 | $ netstat -r 80 | ``` 81 | - ### -ap | grep ssh 82 | To get the port on which a program is running. 83 | ```bash 84 | $ netstat -ap | grep ssh 85 | ``` 86 | - ### -an | grep ':port number' 87 | To get the process which is using the given port. 88 | ```bash 89 | $ netstat -an | grep ':port number' 90 | ``` 91 | 92 | --- 93 | 94 | ## Author 95 | - Michael Kerrisk 96 | 97 | --- 98 | 99 | ## Copyright 100 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later.
101 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 102 | -------------------------------------------------------------------------------- /commands/unzip/README.md: -------------------------------------------------------------------------------- 1 | # Command 2 | 3 | unzip 4 | 5 | --- 6 | 7 | ## Description: 8 | 9 | The `unzip` command in Linux is used to extract files from a ZIP archive. The unzip command is part of the GNU core utilities package, so it is likely pre-installed on your Linux machine. 10 | 11 | --- 12 | 13 | ## Syntax 14 | 15 | ```bash 16 | $ unzip [options] zipfile [file(s)_to_extract] [-x file(s)_to_exclude] 17 | ``` 18 | 19 | --- 20 | 21 | ## Options/Flags 22 | 23 | - ### -l 24 | List the contents of an archive without extracting them. 25 | ```bash 26 | $ unzip -l [FILE] 27 | ``` 28 | - ### -d 29 | Extract files to a specific directory. 30 | ```bash 31 | $ unzip [FILE] -d [DIRECTORY] 32 | ``` 33 | - ### -q 34 | Quiet mode. Suppress informational messages during extraction. 35 | ```bash 36 | $ unzip -q [FILE] 37 | ``` 38 | - ### -o 39 | Overwrite files without prompting. 40 | ```bash 41 | $ unzip -o [FILE] 42 | ``` 43 | - ### -P 44 | Specify a password for encrypted ZIP archives. 45 | ```bash 46 | $ unzip -P [PASSWORD] [FILE] 47 | ``` 48 | - ### -u 49 | Update existing files and create new ones if needed. 50 | ```bash 51 | $ unzip -u [FILE] 52 | ``` 53 | - ### -v 54 | Provide more verbose output. 55 | ```bash 56 | $ unzip -v [FILE] 57 | ``` 58 | - ### -f 59 | Freshen existing files. Extract only those files that are newer than the existing ones. 60 | ```bash 61 | $ unzip -f [FILE] 62 | ``` 63 | - ### -j 64 | Junk the path. Do not create directories; extract all files in the current directory. 65 | ```bash 66 | $ unzip -j [FILE] 67 | ``` 68 | - ### -T 69 | Test the integrity of the ZIP archive. 70 | ```bash 71 | $ unzip -T [FILE] 72 | ``` 73 | - ### -x 74 | Exclude specific files or directories from being extracted. 75 | ```bash 76 | $ unzip [FILE] -x [FILE(S) TO EXCLUDE] 77 | ``` 78 | 79 | --- 80 | 81 | ## Exit Status 82 | 83 | - **0** = Successful operation 84 | - **1** = Operation completed with minor warnings 85 | - **2** = Fatal error occurred 86 | - **3** = Severe error occurred 87 | - **50** = User specified an invalid command line option 88 | - **60-79** = Non-fatal errors occurred 89 | 90 | --- 91 | 92 | ## Author 93 | 94 | - Mark Adler 95 | - Jean-loup Gailly 96 | 97 | --- 98 | 99 | ## Copyright 100 | 101 | Copyright © [Year] Info-ZIP. All rights reserved.
102 | For the most current version of Info-ZIP software, visit: https://www.info-zip.org/ 103 | -------------------------------------------------------------------------------- /commands/cpio/README.md: -------------------------------------------------------------------------------- 1 | # command 2 | 3 | cpio 4 | 5 | --- 6 | 7 | ## Description 8 | 9 | - `cpio` stands for "copy in, copy out". 10 | - It is a command-line utility in Linux/UNIX for creating, listing and extracting archive files. 11 | - It creates a _.cpio_ archive file. 12 | - It can copy the complete file system to an archive file. 13 | 14 | --- 15 | 16 | ## Modes 17 | 18 | There are three modes in cpio command.
19 | 20 | - **Copy-out mode:** In this mode, cpio copies files into an archive with the `-o` or `--create` option. It reads a list of filenames from the standard input and writes to an archive file. 21 | 22 | - **Copy-in mode:** `cpio` copies files out of an archive or prints the archive contents. In this mode, `cpio` uses the `-i` or `--extract` option to read the archives from the standard input. 23 | 24 | - **Copy-pass mode**: `cpio` copies files from one directory tree to another in this mode. It does not create an archive file. 25 | 26 | ## Syntax 27 | 28 | - ### Copy-out mode: 29 | 30 | ```bash 31 | $ cpio -o [option] < name-list > archive 32 | ``` 33 | 34 | - ### Copy-in mode: 35 | 36 | ```bash 37 | $ cpio -i [option] < archive 38 | ``` 39 | 40 | - ### Copy-pass mode: 41 | 42 | ```bash 43 | $ cpio -p [option] destination-directory < name-list 44 | ``` 45 | 46 | --- 47 | 48 | ## Options/Flags 49 | 50 | - ### -v 51 | 52 | This option displays the list of files processed by the `cpio` command. 53 | 54 | - `-ov` is used as `-o` creates a new archive and `-v` list the files processed. 55 | 56 | ```bash 57 | $ cpio -ov < name-list > archive 58 | ``` 59 | 60 | - We can extract `\*.cpio` files containing files and directory with the help of cpio `-i` option. 61 | 62 | ```bash 63 | $ cpio -iv < archive 64 | ``` 65 | 66 | - ### -t 67 | The `-t` option prints the table of contents and doesn't copy any files. 68 | ```bash 69 | $ cpio -itv < /home/linux/commands.cpio 70 | ``` 71 | - ### -H 72 | The `-H` option allows you to specify the archive format. 73 | ```bash 74 | $ cpio -ov -H tar > archive 75 | ``` 76 | - ### -F 77 | To specify _tar_ filename which you want to extract. 78 | ```bash 79 | $ cpio -iv -F < archive 80 | ``` 81 | 82 | --- 83 | 84 | ## Exit Status 85 | 86 | - **0**: Successful completion 87 | - **>0**: An error occurred 88 | 89 | --- 90 | 91 | ## Author 92 | 93 | - Dick Haight 94 | 95 | --- 96 | 97 | ## Copyright 98 | 99 | GNU cpio: GPLv3
100 | libarchive bsdcpio: New BSD License 101 | 102 | --- 103 | -------------------------------------------------------------------------------- /commands/cat/README.md: -------------------------------------------------------------------------------- 1 | # cat 2 | 3 | Open a file in the terminal. 4 | 5 | --- 6 | 7 | ## Description 8 | - It is used to print the content of a file onto the standard output stream. 9 | - It also allows us to write some texts into a file. 10 | 11 | --- 12 | 13 | ## Syntax 14 | ```bash 15 | $ cat {filename} 16 | ``` 17 | 18 | --- 19 | 20 | ## Options/Flags 21 | - ### > 22 | Create a file and add data to it 23 | ```bash 24 | $ cat > {name} 25 | ``` 26 | - ### >> 27 | Write in an already existing file 28 | ```bash 29 | $ cat >> {filename} 30 | ``` 31 | - ### {file1} > {file2} 32 | Copy contents from one file to another 33 | ```bash 34 | $ cat {file1} > {file2} 35 | ``` 36 | - ### {file1} >> {file2} 37 | Append the contents of one file to the end of another file 38 | ```bash 39 | $ cat {file1} >> {file2} 40 | ``` 41 | - ### -E 42 | Highlight the end of the line. 43 | ```bash 44 | $ cat -E {filename} 45 | ``` 46 | - ### -n 47 | View the contents of a file preceding with line numbers 48 | ```bash 49 | $ cat -n {filename} 50 | ``` 51 | - ### -t 52 | Show TAB separated lines 53 | ```bash 54 | $ cat -t [file] 55 | ``` 56 | - ### -s 57 | Remove blank lines 58 | ```bash 59 | $ cat -s [file] 60 | ``` 61 | - ### -s 62 | Suppress repeated empty lines in output 63 | ```bash 64 | $ cat -s {filename} 65 | ``` 66 | - ### -- 67 | Open dashed files 68 | ```bash 69 | $ cat -- {filename} 70 | ``` 71 | - ### --help 72 | Display this help and exit 73 | ```bash 74 | $ cat --help 75 | ``` 76 | - ### --version 77 | Output version information and exit 78 | ```bash 79 | $ cat --version 80 | ``` 81 | 82 | ## Other functionalities: 83 | 84 | - ### Display contents of multiple files 85 | ```bash 86 | $ cat [file1] [file2] 87 | ``` 88 | - ### Redirect contents of multiple files 89 | ```bash 90 | $ cat [file1] [file2] > [file3] 91 | ``` 92 | - ### Display the contents in reverse order 93 | ```bash 94 | $ tac [file] 95 | ``` 96 | - ### More and less options (manage large files) 97 | ```bash 98 | $ cat [file] | more 99 | $ cat [file] | less 100 | ``` 101 | --- 102 | 103 | ## Author 104 | - Ken Thompson 105 | - Dennis Ritchie 106 | 107 | --- 108 | 109 | ## Copyright 110 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later.
111 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 112 | -------------------------------------------------------------------------------- /commands/watch/README.md: -------------------------------------------------------------------------------- 1 | # watch 2 | Execute a program periodically. 3 | 4 | --- 5 | 6 | ## Description 7 | The watch command is used for running user-defined commands at regular intervals. 8 | By default, the specified command will run every 2 seconds and watch will run until interrupted. 9 | 10 | --- 11 | 12 | ## Syntax 13 | ```bash 14 | $ watch [option] [command] 15 | ``` 16 | 17 | --- 18 | 19 | ## Options/Flags 20 | - ### -n: 21 | Allows you to specify the interval between output updates. 22 | ```bash 23 | $ watch -n [command] 24 | ``` 25 | - ### -d: 26 | Highlights the differences between output updates. 27 | ```bash 28 | $ watch -d [command] 29 | ``` 30 | - ### -g: 31 | Exits the watch command when the output of the user-defined command changes. 32 | ```bash 33 | $ watch -g [command] 34 | ``` 35 | - ### -t: 36 | Removes the header showing the interval, command, current time and date. 37 | ```bash 38 | $ watch -t [command] 39 | ``` 40 | - ### -b: 41 | Plays a sound alert (beep) if the command exits with an error. 42 | ```bash 43 | $ watch -b [command] 44 | ``` 45 | - ### -p: 46 | Attempts to run the command after the exact number of seconds defined by the --interval option. 47 | ```bash 48 | $ watch -p [command] 49 | ``` 50 | - ### -e: 51 | Stops output updates on an error and exits the command after a key press. 52 | ```bash 53 | $ watch -e [command] 54 | ``` 55 | - ### -c: 56 | Interprets ANSI color and style sequences. 57 | ```bash 58 | $ watch -c [command] 59 | ``` 60 | - ### -x: 61 | Passes the user-defined command to exec, reducing the need for extra quoting. 62 | ```bash 63 | $ watch -x [command] 64 | ``` 65 | - ### -w: 66 | Turns off line wrapping and truncates long lines instead. 67 | ```bash 68 | $ watch -w [command] 69 | ``` 70 | - ### -h: 71 | Displays help text and exits. 72 | ```bash 73 | $ watch -h 74 | ``` 75 | - ### -v: 76 | Displays version information and exits. 77 | ```bash 78 | $ watch -v 79 | ``` 80 | 81 | --- 82 | 83 | ## Exit Status 84 | - **0**: The command executed successfully. 85 | - **1**: An error occurred during the execution of the command. 86 | 87 | --- 88 | 89 | ## Author 90 | - Tony Rems 91 | - Rob Warren 92 | 93 | --- 94 | 95 | ## Copyright 96 | - The `watch` command is part of the procps-ng package. 97 | - Copyright © 2012-2021 Free Software Foundation, Inc. 98 | - License GPLv3+: GNU GPL version 3 or later. 99 | - This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. 100 | 101 | --- 102 | -------------------------------------------------------------------------------- /commands/man/README.md: -------------------------------------------------------------------------------- 1 | # man 2 | 3 | --- 4 | ###### manual 5 | ## Description 6 | man command in Linux is used to display the user manual of any command that we can run on the terminal. 7 | 8 | ##### It provides a detailed view of the command which includes 9 | 1. NAME 10 | 2. SYNOPSIS 11 | 3. DESCRIPTION 12 | 4. OPTIONS 13 | 5. EXIT STATUS 14 | 6. RETURN VALUES 15 | 7. ERRORS, FILES 16 | 8. VERSIONS, EXAMPLES 17 | 9. AUTHORS and SEE ALSO. 18 | 19 | --- 20 | 21 | ## Syntax 22 | ```bash 23 | $man [OPTION]... [COMMAND NAME]... 24 | ``` 25 | --- 26 | 27 | ## Options/Flags 28 | - ### No Option. 29 | It displays the whole manual of the command. 30 | ``` 31 | $ man [COMMAND NAME] 32 | ``` 33 | - ### Section-num. 34 | Since a manual is divided into multiple sections so this option is used to display only a specific section of a manual. 35 | ``` 36 | $ man [SECTION-NUM] [COMMAND NAME] 37 | ``` 38 | Example: 39 | ``` 40 | $ man 2 intro 41 | ``` 42 | - ### -f option. 43 | One may not be able to remember the sections in which a command is present. So this option gives the section in which the given command is present. 44 | ``` 45 | $ man -f [COMMAND NAME] 46 | ``` 47 | Example: 48 | ``` 49 | $ man -f ls 50 | ``` 51 | - ### -a option. 52 | This option helps us to display all the available intro manual pages in succession. 53 | ``` 54 | $ man -a [COMMAND NAME] 55 | ``` 56 | Example: 57 | ``` 58 | $ man -a intro 59 | ``` 60 | - ### -k option. 61 | This option searches the given command as a regular expression in all the manuals and it returns the manual pages with the section number in which it is found 62 | ``` 63 | $ man -k [COMMAND NAME] 64 | ``` 65 | Example: 66 | ``` 67 | $ man -k cd 68 | ``` 69 | - ### -w option. 70 | This option returns the location in which the manual page of a given command is present. 71 | ``` 72 | $ man -w [COMMAND NAME] 73 | ``` 74 | Example: 75 | ``` 76 | $ man -w ls 77 | ``` 78 | - ### -I option. 79 | It considers the command as case sensitive. 80 | ``` 81 | $ man -I [COMMAND NAME] 82 | ``` 83 | Example: 84 | ``` 85 | $ man -I printf 86 | ``` 87 | 88 | 89 | --- 90 | 91 | 92 | 93 | ## Author 94 | - Rohit Soni 95 | - eference :- [WEBSITE](https://www.geeksforgeeks.org/man-command-in-linux-with-examples/#:~:text=man%20command%20in%20Linux%20is,EXAMPLES%2C%20AUTHORS%20and%20SEE%20ALSO.) 96 | 97 | --- 98 | 99 | ## Copyright 100 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later. 101 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 102 | -------------------------------------------------------------------------------- /commands/whois/README.md: -------------------------------------------------------------------------------- 1 | # command 2 | 3 | whois 4 | 5 | --- 6 | 7 | ## Description 8 | 9 | - Identifies a user by user ID or alias. 10 | - `whois` performs the registration record for the domain name or IP address that you specify. 11 | - `whois` is a command-line utility used in Linux systems to retrieve information about domain names, IP addresses, and network devices registered with the Internet Corporation for Assigned Names and Numbers (ICANN). 12 | 13 | --- 14 | 15 | ## Syntax 16 | 17 | ```bash 18 | $ whois [options] [domain_name] 19 | ``` 20 | 21 | --- 22 | 23 | ## Options/Flags 24 | 25 | - ### Basic Usage: 26 | 27 | This command retrieves the WHOIS information for the domain _example.com_. 28 | 29 | ```bash 30 | $ whois example.com 31 | ``` 32 | 33 | - ### -h 34 | 35 | Here, `-h` specifies the WHOIS server to use (_whois.example.com_) for querying information about _example.com_. 36 | 37 | ```bash 38 | $ whois -h whois.example.com example.com 39 | ``` 40 | 41 | - ### Querying for IP Addresses: 42 | 43 | Retrieves information about the IP address 8.8.8.8. 44 | 45 | ```bash 46 | $ whois 8.8.8.8 47 | ``` 48 | 49 | - ### -v 50 | 51 | `-v` provides more verbose or detailed output for the domain _example.com_. 52 | 53 | ```bash 54 | $ whois -v example.com 55 | ``` 56 | 57 | - ### -T 58 | 59 | Using `-T` domain specifies that the query is for domain-related information about _example.com_. 60 | 61 | ```bash 62 | $ whois -T domain example.com 63 | ``` 64 | 65 | - ### -i 66 | 67 | `-i` performs a case-insensitive search for _example.com_. 68 | 69 | ```bash 70 | $ whois -i example.com 71 | ``` 72 | 73 | - ### -a 74 | `-a` returns raw output without filtering or formatting for _example.com_. 75 | ```bash 76 | $ whois -a example.com 77 | ``` 78 | - ### Checking Autonomous System Number (ASN): 79 | 80 | This command retrieves information about the Autonomous System Number (ASN) 32934 (Google's ASN) from a specific WHOIS server (whois.radb.net) 81 | 82 | ```bash 83 | $ whois -h whois.radb.net -- '-i origin AS32934' 84 | 85 | ``` 86 | 87 | --- 88 | 89 | ## Exit Status 90 | 91 | - **0:** The `whois` command completed successfully and retrieved the requested information from the WHOIS database. 92 | - **1:** This status code might indicate a failure or error. It could signify issues like an invalid domain name, network connectivity problems, or other failures during the lookup process. 93 | - **2:** Less commonly used, but it might denote syntax errors in the command itself or specific issues related to the execution of the whois command. 94 | 95 | --- 96 | 97 | ## Author 98 | 99 | - Elizabeth Feinler 100 | 101 | --- 102 | 103 | ## Copyright 104 | 105 | GNU General Public License (GPL)
106 | BSD License 107 | 108 | --- 109 | -------------------------------------------------------------------------------- /commands/chmod/README.md: -------------------------------------------------------------------------------- 1 | # chmod 2 | change file mode bits 3 | 4 | --- 5 | 6 | ## Description 7 | Changes the permission on a file or directory 8 | 9 | --- 10 | 11 | ## File Permissions 12 | There are three types of file permissions: read(r), write(w), and execute(x) 13 | read(r): view contents of the file 14 | write(w): to make changes in contents of the file 15 | execute(x): execute means to be able to run a file 16 | 17 | ### To get permissions of all the files and folders in directory: 18 | ```bash 19 | $ ls -l 20 | ``` 21 | ### After ls -l output is: 22 |
23 | 24 |
25 |
26 |
27 |
28 | 29 |
30 | 31 | Here first positon represent object's type: - for a file, d for a directory, and l for a symbolic link. 32 | The next nine positions are grouped in threes and represents the permission mode. 33 | 34 |
35 | 36 |
37 | 38 | --- 39 | 40 | ## Syntax 41 | 42 | The chmod commands modifies the permissions of the object. 43 | 44 | ```bash 45 | chmod [OPTION]... MODE[,MODE]... FILE... 46 | ``` 47 | --- 48 | 49 | ## Explaination and Examples 50 | 51 | - ### Changing permissions with chmod(letters) 52 | Here plus(+) symbol adds a permission, and minus(-) symbol removes a permission. 53 | - Example: 54 | ```bash 55 | $ chmod u+x,g-r,o+w commands.txt 56 | ``` 57 | This command is for the commands.txt file. 58 | 1) u+x means the user is given the permission to execute. 59 | 2) g-r means the group dosen't have the permission to read. 60 | 3) o+w means the others are given the permission to write. 61 | 62 | - ### Changing permissions with chmod(numbers) 63 | Here r=4, w=2, x=1 use each set’s total number to establish the permission. 64 | - Example: 65 | ```bash 66 | $ chmod 743 commands.txt 67 | ``` 68 | Here first number i.e 7, is referred to as permisson given to user which is 4+2+1 meaning it has all the permission of read, write and execute. 69 | Second number i.e 4, is referred to as permission given to group which is 4+0+0 meaning it has only read permission and no write and execute permission. 70 | Third number i.e 3, is referred to as permission given to other which is 0+2+1 meaning it has only write and execute permission and no read permission. 71 | 72 | --- 73 | 74 | ## Author 75 | - David MacKenzie 76 | - Jim Meyering. 77 | 78 | --- 79 | 80 | ## Copyright 81 | Copyright © 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later. 82 | This is free software, you are free to change and redistribute the information. There is NO WARRANTY, to the extent permitted by law. 83 | -------------------------------------------------------------------------------- /commands/reboot/README.md: -------------------------------------------------------------------------------- 1 | # reboot 2 | Reboot, halt, or power-off the system. 3 | 4 | --- 5 | 6 | ## Description 7 | `reboot`, `halt`, and `poweroff` are commands used to initiate a system reboot, halt, or power-off. All three commands may take the same options. 8 | 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | $ reboot [options] 14 | ``` 15 | or 16 | ```bash 17 | $ halt [options] 18 | ``` 19 | or 20 | ```bash 21 | $ poweroff [options] 22 | ``` 23 | 24 | --- 25 | 26 | ## Options/Flags 27 | - ### --help: 28 | #### Print a short help text and exit. 29 | ```bash 30 | $ reboot --help 31 | ``` 32 | or 33 | ```bash 34 | $ halt --help 35 | ``` 36 | or 37 | ```bash 38 | $ poweroff --help 39 | ``` 40 | - ### --halt: 41 | #### Halt the machine, regardless of which one of the three commands is invoked. 42 | ```bash 43 | $ reboot --halt 44 | ``` 45 | or 46 | ```bash 47 | $ halt 48 | ``` 49 | or 50 | ```bash 51 | $ poweroff --halt 52 | ``` 53 | - ### -p, --poweroff: 54 | #### Power-off the machine, when either `halt` or `poweroff` is invoked. This option is ignored when reboot is invoked. 55 | ```bash 56 | $ halt -p 57 | ``` 58 | or 59 | ```bash 60 | $ poweroff 61 | ``` 62 | - ### --reboot: 63 | #### Reboot the machine, regardless of which one of the three commands is invoked. 64 | ```bash 65 | $ reboot 66 | ``` 67 | or 68 | ```bash 69 | $ halt --reboot 70 | ``` 71 | or 72 | ```bash 73 | $ poweroff --reboot 74 | - ### -f, --force: 75 | #### Force immediate halt, power-off, reboot. 76 | ```bash 77 | $ reboot -f 78 | ``` 79 | 80 | ```bash 81 | $ halt -f 82 | ``` 83 | 84 | ```bash 85 | $ poweroff -f 86 | - ### -w, --wtmp-only: 87 | #### Only write wtmp shutdown entry, do not actually halt, power-off, reboot. 88 | ```bash 89 | $ reboot -w 90 | ``` 91 | 92 | ```bash 93 | $ halt -w 94 | ``` 95 | 96 | ```bash 97 | $ poweroff -w 98 | ``` 99 | - ### -d, --no-wtmp: 100 | #### Do not write wtmp shutdown entry. 101 | ```bash 102 | $ reboot -d 103 | ``` 104 | 105 | ```bash 106 | $ halt -d 107 | ``` 108 | 109 | ```bash 110 | $ poweroff -d 111 | ``` 112 | - ### -n, --no-sync: 113 | #### Don't sync hard disks/storage media before halt, power-off, reboot. 114 | ```bash 115 | $ reboot -n 116 | ``` 117 | 118 | ```bash 119 | $ halt -n 120 | ``` 121 | 122 | ```bash 123 | $ poweroff -n 124 | ``` 125 | - ### --no-wall: 126 | #### Do not send wall message before halt, power-off, or reboot. 127 | ```bash 128 | $ reboot --no-wall 129 | ``` 130 | 131 | ```bash 132 | $ halt --no-wall 133 | ``` 134 | 135 | ```bash 136 | $ poweroff --no-wall 137 | ``` 138 | 139 | --- 140 | 141 | ## Exit Status 142 | - **0** = Success 143 | - **!0** = Failure 144 | --- 145 | -------------------------------------------------------------------------------- /commands/traceroute/README.md: -------------------------------------------------------------------------------- 1 | # command 2 | 3 | traceroute 4 | 5 | --- 6 | 7 | ## Description 8 | 9 | - `traceroute` command in Linux prints the route that a packet takes to reach the host. 10 | - This command is useful when you want to know about the route and about all the hops that a packet takes. 11 | - Below image depicts how traceroute command is used to reach the Google(172.217.26.206) host from the local machine and it also prints detail about all the hops that it visits in between. 12 | 13 | gfg traceroute 14 | 15 | --- 16 | 17 | ## Syntax 18 | 19 | ```bash 20 | $ traceroute [options] host_Address [pathlength] 21 | ``` 22 | 23 | --- 24 | 25 | ## Options/Flags 26 | 27 | - ### -4 28 | 29 | Use ip version 4 i.e. use IPv4. 30 | 31 | ```bash 32 | $ traceroute -4 google.com 33 | ``` 34 | 35 | - ### -6 36 | 37 | Use ip version 6 i.e. use IPv6. 38 | 39 | ```bash 40 | $ traceroute -6 google.com 41 | ``` 42 | 43 | - ### -F 44 | 45 | Do not fragment packet. 46 | 47 | ```bash 48 | $ traceroute -F google.com 49 | ``` 50 | 51 | - ### -f 52 | 53 | Start from the first_ttl(time to live) hop (instead from 1). 54 | 55 | ```bash 56 | $ traceroute -f 10 google.com 57 | ``` 58 | 59 | - ### -g 60 | Route the packet through gate. 61 | ```bash 62 | $ traceroute -g 192.168.43.45 google.com 63 | ``` 64 | - ### -m 65 | Set the max number of hops for the packet to reach the destination.Default value is **30**. 66 | ```bash 67 | $ traceroute -m 5 google.com 68 | ``` 69 | - ### -n 70 | Do not resolve IP addresses to their domain names. 71 | ```bash 72 | $ traceroute -n google.com 73 | ``` 74 | - ### -p 75 | Set the destination port to use. Default is **33434**. 76 | ```bash 77 | $ traceroute -p 20292 google.com 78 | ``` 79 | - ### -q 80 | Set the number of probes per each hop. Default is **3**. 81 | ```bash 82 | $ traceroute -q 1 google.com 83 | ``` 84 | - ### packetlen 85 | The full packet length. Default len is **60 byte** packets. 86 | ```bash 87 | $ traceroute google.com 100 88 | ``` 89 | - ### --help 90 | Display help messages and exit. 91 | ```bash 92 | $ traceroute --help 93 | ``` 94 | 95 | --- 96 | 97 | ## Exit Status 98 | 99 | - **0:** The traceroute command completed successfully without any errors. It found the route to the destination and finished tracing it. 100 | - **1:** This status code might indicate a generic error. It could signify issues such as improper usage of the command or problems encountered during the traceroute process, like unreachable destinations or network problems. 101 | - **2:** Often used to indicate that the traceroute command encountered syntax errors or invalid command-line options. 102 | 103 | --- 104 | 105 | ## Author 106 | 107 | - Van Jacobson 108 | 109 | --- 110 | 111 | ## Copyright 112 | 113 | - BSD License 114 | - GNU General Public License (GPL). 115 | 116 | --- 117 | -------------------------------------------------------------------------------- /commands/host/README.md: -------------------------------------------------------------------------------- 1 | # command 2 | 3 | host 4 | 5 | --- 6 | 7 | ## Description 8 | 9 | - Host command in Linux system is used for DNS (Domain Name System) lookup operations. 10 | - This command is used to find the IP address of a particular domain name or if you want to find out the domain name of a particular IP address the host command becomes handy. 11 | - You can also find more specific details of a domain by specifying the corresponding option along with the domain name. 12 | 13 | --- 14 | 15 | ## Syntax 16 | 17 | ```bash 18 | $ host [-aCdlriTWV] [-c class] [-N ndots] [-t type] [-W time] [-R number] [-m flag] hostname [server] 19 | ``` 20 | 21 | --- 22 | 23 | ## Note 24 | 25 | **`host` command without any option:** It will print the general syntax of the command along with the various options that can be used with the `host` command as well as gives a brief description about each option. 26 | 27 | ## Options/Flags 28 | 29 | - ### host domain_name: 30 | 31 | This will print the IP address details of the specified domain. 32 | 33 | ```bash 34 | $ host wcewlug.org 35 | ``` 36 | 37 | - ### host IP_Address: 38 | This will display the domain details of the specified IP Address. 39 | ```bash 40 | $ host 52.25.109.230 41 | ``` 42 | - ### -a or -v 43 | 44 | It is used to specify the query type or enable the verbose output. 45 | 46 | ```bash 47 | $ host -a wcewlug.org 48 | ``` 49 | 50 | - ### -t 51 | 52 | - It is used to specify the type of query. 53 | 54 | ```bash 55 | $ host -t ns wcewlug.org 56 | ``` 57 | 58 | - To print SOA record. 59 | 60 | ```bash 61 | $ host -t SOA wcewlug.org 62 | ``` 63 | 64 | - To print txt record. 65 | 66 | ```bash 67 | $ host -t txt wcewlug.org 68 | ``` 69 | 70 | - ### -C 71 | In order to compare the SOA records on authoritative nameservers. 72 | ```bash 73 | $ host -C wcewlug.org 74 | ``` 75 | - ### -R 76 | 77 | In order to specify the number of retries you can do in case one try fails. If anyone try succeeds then the command stops. 78 | 79 | ```bash 80 | $ host -R 3 wcewlug.org 81 | ``` 82 | 83 | - ### -l 84 | In order to list all hosts in a domain. For this command to work you need to be either an admin or a node server. 85 | ```bash 86 | $ host -l wcewlug.org 87 | ``` 88 | 89 | --- 90 | 91 | ## Exit Status 92 | 93 | - **0**: The host command completed successfully and obtained the requested information, such as resolving a domain name to an IP address. 94 | 95 | - **1**: This status code might indicate a failure or error. It could signify issues like an invalid domain name, network connectivity problems, or other failures during the lookup process. 96 | 97 | - **2**: Less commonly used, but it might denote syntax errors in the command itself or specific issues related to the execution of the host command. 98 | 99 | --- 100 | 101 | ## Author 102 | 103 | - Internet Systems Consortium (ISC) 104 | 105 | --- 106 | 107 | ## Copyright 108 | 109 | Mozilla Public License 2.0 110 | 111 | --- 112 | -------------------------------------------------------------------------------- /commands/hostname/README.md: -------------------------------------------------------------------------------- 1 | # HOSTNAME 2 | hostname - show or set the system's host name 3 | domainname - show or set the system's NIS/YP domain name 4 | ypdomainname - show or set the system's NIS/YP domain name 5 | nisdomainname - show or set the system's NIS/YP domain name 6 | dnsdomainname - show the system's DNS domain name 7 | 8 | --- 9 | 10 | ## Description 11 | Hostname is used to display the system's DNS name 12 | 13 | --- 14 | 15 | ## Syntax 16 | ```bash 17 | syntax of command 18 | ``` 19 | 20 | --- 21 | 22 | ## Options/Flags 23 | - ### -a, --alias 24 | Display the alias name of the host (if used). This option is deprecated and should not be used anymore. 25 | ```bash 26 | $ hostname -a 27 | ``` 28 | - ### -A, --all-fqdns 29 | Displays all FQDNs of the machine. This option enumerates all configured network addresses on all configured network interfaces, and translates them to DNS domain names. Addresses that cannot be translated (i.e. because they do not have an appropriate reverse IP entry) are 30 | skipped. 31 | Note that different addresses may resolve to the same name, therefore the output may contain duplicate entries. Do not make any as‐ 32 | sumptions about the order of the output. 33 | ```bash 34 | $ hostname -A 35 | ``` 36 | - ### -b, --boot 37 | Always set a hostname; this allows the file specified by -F to be non-existent or empty, in which case the default hostname localhost will be used if none is yet set. 38 | ```bash 39 | $ hostname -b 40 | ``` 41 | - ### -d, --domain 42 | Display the name of the DNS domain. Don't use the command domainname to get the DNS domain name because it will show the NIS domain name and not the DNS domain name. Use dnsdomainname instead. See the warnings in section THE FQDN above, and avoid using this option. 43 | ```bash 44 | $ hostname -d 45 | or 46 | $ hostname -domain 47 | ``` 48 | - ### f, --fqdn, --long 49 | Display the FQDN (Fully Qualified Domain Name). A FQDN consists of a short host name and the DNS domain name. Unless you are using bind or NIS for host lookups you can change the FQDN and the DNS domain name (which is part of the FQDN) in the /etc/hosts file. See the warnings in section THE FQDN above und use hostname --all-fqdns instead wherever possible. 50 | ```bash 51 | $hostname -f 52 | ``` 53 | - ### -i, --ip-address 54 | As name suggest it shows the ip address of the machine. 55 | ```bash 56 | $ hostname -i 57 | or 58 | $ hostname --ip-address 59 | ``` 60 | - ### -I, --all-ip-addresse 61 | Display all network addresses of the host. This option enumerates all configured addresses on all network interfaces. The loopback interface and IPv6 link-local addresses are omitted. Contrary to option -i, this option does not depend on name resolution. Do not make any assumptions 62 | about the order of the output 63 | ```bash 64 | $ hostname -I 65 | or 66 | $ hostname --all-ip-address 67 | ``` 68 | 69 | --- 70 | ## AUTHORS 71 | Peter Tobias, 72 | Bernd Eckenfels, (NIS and manpage). 73 | Michael Meskes, -------------------------------------------------------------------------------- /commands/whereis/README.md: -------------------------------------------------------------------------------- 1 | ## whereis 2 | 3 | Locate the binary, source, and manual page files for a command. 4 | 5 | --- 6 | 7 | ## Description 8 | 9 | - `whereis` locates the binary, source, and manual files for the specified command names. The supplied names are first stripped of leading pathname components. Prefixes of s. resulting from the use of source code control are also dealt with. `whereis` then attempts to locate the desired program in the standard Linux places, and in the places specified by _**$PATH**_ and _**$MANPATH**_. 10 | - The search restrictions (options -b, -m, and -s) are cumulative and apply to the subsequent name patterns on the command line. Any new search restriction resets the search mask. 11 | 12 | --- 13 | 14 | ## Syntax 15 | 16 | ```bash 17 | $ whereis [options] filename... 18 | ``` 19 | 20 | --- 21 | 22 | ## Options/Flags 23 | 24 | - ### -b 25 | Search for binaries. 26 | ```bash 27 | $ whereis -b filename 28 | ``` 29 | 30 | - ### -m 31 | Search for manuals. 32 | ```bash 33 | $ whereis -m filename 34 | ``` 35 | 36 | - ### -s 37 | Search for sources. 38 | ```bash 39 | $ whereis -s filename 40 | ``` 41 | 42 | - ### -u 43 | Only show the command names that have unusual entries. A command is said to be unusual if it does not have just one entry of each explicitly requested type. Thus `whereis -m -u *` asks for those files in the current directory which have no documentation file, or more than one. 44 | ```bash 45 | $ whereis -u filename 46 | ``` 47 | 48 | - ### -B list 49 | Limit the places where `whereis` searches for binaries, by a whitespace-separated list of directories. 50 | ```bash 51 | $ whereis -B directory_list filename 52 | ``` 53 | 54 | - ### -M list 55 | Limit the places where `whereis` searches for manuals and documentation in Info format, by a whitespace-separated list of directories. 56 | ```bash 57 | $ whereis -M directory_list filename 58 | ``` 59 | 60 | - ### -S list 61 | Limit the places where `whereis` searches for sources, by a whitespace-separated list of directories. 62 | ```bash 63 | $ whereis -S directory_list filename 64 | ``` 65 | 66 | - ### -f 67 | Terminates the directory list and signals the start of filenames. It must be used when any of the -B, -M, or -S options is used. 68 | ```bash 69 | $ whereis -f -B directory_list -M directory_list -S directory_list filename 70 | ``` 71 | 72 | - ### -l 73 | Output the list of effective lookup paths that `whereis` is using. When none of -B, -M, or -S is specified, the option will output the hard-coded paths that the command was able to find on the system. 74 | ```bash 75 | $ whereis -l 76 | ``` 77 | 78 | - ### -h, --help 79 | Display help text and exit. 80 | ```bash 81 | $ whereis -h 82 | ``` 83 | 84 | - ### -V, --version 85 | Print version and exit. 86 | ```bash 87 | $ whereis -V 88 | ``` 89 | 90 | --- 91 | 92 | ## Author 93 | - Michael Haardt 94 | --- 95 | 96 | ## Copyright 97 | 98 | Copyright © [Year] Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later.
99 | This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. 100 | 101 | -------------------------------------------------------------------------------- /commands/tar/README.md: -------------------------------------------------------------------------------- 1 | # command 2 | 3 | tar 4 | 5 | --- 6 | 7 | ## Description 8 | 9 | - The Linux ‘**tar**’ stands for tape archive. 10 | - It is used to create archive and extract the archive files. 11 | - `tar` command in Linux is one of the important command which provides archiving functionality in Linux. 12 | - We can use Linux tar command to create compressed or uncompressed archive files and also maintain and modify them. 13 | 14 | --- 15 | 16 | ## Syntax 17 | 18 | ```bash 19 | $ tar [options] [archive-file] [file or directory to be archived] 20 | ``` 21 | 22 | --- 23 | 24 | ## Options/Flags 25 | 26 | - ### -cvf 27 | 28 | Creating an uncompressed tar archive using option `-cvf`. This command creates a tar file called _file.tar_ which is the archive of all _.c_ files in current directory. 29 | 30 | ```bash 31 | $ tar cvf file.tar *.c 32 | ``` 33 | 34 | - ### -xvf 35 | Extracting files from archive using option `-xvf`. This command extracts files from archives. 36 | ```bash 37 | $ tar xvf file.tar 38 | ``` 39 | - ### -z 40 | 41 | gzip compression on the tar archive, using option `-z`. This command creates a tar file called _file.tar.gz_ which is the archive of _.c_ files. 42 | 43 | ```bash 44 | $ tar -zcvf file.tar.gz *.c 45 | ``` 46 | 47 | Extracting a gzip tar archive _\*.tar.gz_ using option `-xvzf`. This command extracts files from tar archived _file.tar.gz_ files. 48 | 49 | ```bash 50 | $ tar -zxvf file.tar.gz 51 | ``` 52 | 53 | - ### -j 54 | 55 | Creating compressed tar archive file in Linux using option `-j`. This command compresses and creates archive file less than the size of the gzip. Both compress and decompress takes more time than gzip. 56 | 57 | ```bash 58 | $ tar cvfj file.tar.tbz example.cpp 59 | ``` 60 | 61 | - ### -C 62 | Untar single tar file or specified directory in Linux. This command will Untar a file in current directory or in a specified directory using `-C` option. 63 | ```bash 64 | $ tar xvfj file.tar -C [path of file in directoy] 65 | ``` 66 | - ### -c 67 | Check size of existing _tar_, _tar.gz_, _tar.tbz_ file in Linux. The above command will display the size of archive file in Kilobytes(KB). 68 | ```bash 69 | $ tar czf file.tar | wc -c 70 | ``` 71 | 72 | --- 73 | 74 | ## Exit Status 75 | 76 | - **0** (EXIT_SUCCESS): The operation completed successfully without any errors. 77 | - **1** (EXIT_FAILURE): General error, indicating some unspecified problem with the tar command. 78 | - **2**: Fatal error. This might indicate issues like incorrect command-line options, improper usage, or inability to access the archive or files. 79 | - **4**: Warning exit code. This might indicate issues like some files changed while tar was archiving them. 80 | - **6**: archive extraction error. It might occur if there are issues during the extraction process, such as insufficient permissions, corrupted archives, or unrecognized archive formats. 81 | - **8**: Inconsistent archive errors. This could occur when the archive is found to be inconsistent or corrupted. 82 | 83 | --- 84 | 85 | ## Author 86 | 87 | - John Gilmore 88 | - some other contributors as part of the GNU project. 89 | 90 | --- 91 | 92 | ## Copyright 93 | 94 | BSD tar: BSD-2-Clause
95 | GNU tar: GPL-3.0-or-later
96 | pdtar: Public domain
97 | Plan 9: MIT
98 | star: CDDL-1.0 99 | 100 | --- 101 | 102 | -------------------------------------------------------------------------------- /commands/nslookup/README.md: -------------------------------------------------------------------------------- 1 | # command 2 | 3 | nslookup 4 | 5 | --- 6 | 7 | ## Description 8 | 9 | - `nslookup` stands for "Name Server Lookup". 10 | - It is a useful command for getting information from the DNS server. 11 | - It is a network administration tool for querying the Domain Name System (DNS) to obtain domain name or IP address mapping or any other specific DNS record. 12 | - It is also used to troubleshoot DNS-related problems. 13 | 14 | --- 15 | 16 | ## Syntax 17 | 18 | ```bash 19 | $ nslookup [option] [domain-name] 20 | ``` 21 | 22 | --- 23 | 24 | ## Options/Flags 25 | 26 | - ### -type=ns 27 | 28 | **Name Server (NS)** records store names of the domain's name servers. To see a domain's NS records, type: 29 | 30 | ```bash 31 | $ nslookup -type=ns [domain-name] 32 | ``` 33 | 34 | - ### -type=mx 35 | MX records store all relevant **Mail Exchange(MX)** server data. This information is used to route all email requests for the domain to the appropriate mail server. 36 | ```bash 37 | $ nslookup -type=mx [domain-name] 38 | ``` 39 | - ### Reverse DNS Lookup 40 | 41 | While `nslookup` provides information about a domain name, it can also be used to look for the domain name associated with an IP address.
Perform a reverse DNS lookup using the following syntax: 42 | 43 | ```bash 44 | $ nslookup [ip-address] 45 | ``` 46 | 47 | - ### -type=soa 48 | 49 | **Start of Authority (SOA)** records provide authoritative information about the domain and the server, such as the email address of the administrator, serial number, refresh interval, query expiration time, etc.
View a domain's SOA records by typing: 50 | 51 | ```bash 52 | $ nslookup -type=soa [domain-name] 53 | ``` 54 | 55 | - ### -type=txt 56 | TXT records contain important information for users outside of the domain. For example, Google and Facebook use TXT records to verify domain ownership
View a domain's TXT information by running the following `nslookup` command: 57 | ```bash 58 | $ nslookup -type=txt [domain-name] 59 | ``` 60 | - ### -type=any 61 | View all available DNS records of a domain using any option. 62 | ```bash 63 | $ nslookup -type=any [domain-name] 64 | ``` 65 | - ### -type=ptr 66 | Pointer records are used for reverse DNS lookups to confirm that the IP address belongs to a specific domain name. When using the ptr option, type the IP address in reverse, i.e., 1.2.3.4 becomes 4.3.2.1: 67 | ```bash 68 | $ nslookup -type=ptr [reverse-ip-address].in-addr.arpa 69 | ``` 70 | - ### -port=[port-number] 71 | DNS servers use port **53** to communicate. If you want to check a different port, specify it with the port option: 72 | ```bash 73 | $ nslookup -port=[port-number] [domain-name] 74 | ``` 75 | - ### -debug 76 | To view information useful for debugging, use the debug option: 77 | ```bash 78 | $ nslookup -debug [domain-name] 79 | ``` 80 | 81 | --- 82 | 83 | ## Exit Status 84 | 85 | - **0**: The query was successful, and the information was retrieved as requested. 86 | - **1**: Typically signifies a general failure or an error in the query. This can cover a range of issues such as an invalid domain name, network connectivity problems, or other failures during the query process. 87 | - **2**: Less commonly used, but in some cases, it might denote syntax errors in the command itself or specific issues related to the execution of the `nslookup` command. 88 | 89 | --- 90 | 91 | ## Author 92 | 93 | - Internet Systems Consortium 94 | - Andrew Cherenson 95 | - IBM 96 | - Microsoft 97 | - Lucas Suggs 98 | 99 | --- 100 | 101 | ## Copyright 102 | 103 | Microsoft Windows
104 | IBM OS/2: Proprietary commercial software
105 | ReactOS: GNU General Public License 106 | 107 | --- 108 | -------------------------------------------------------------------------------- /commands/ping/README.md: -------------------------------------------------------------------------------- 1 | # ping 2 | ping, ping6 - send ICMP ECHO_REQUEST to network hosts 3 | 4 | --- 5 | 6 | ## Description 7 | ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to elicit an ICMP ECHO_RESPONSE from a host or gateway. ECHO_REQUEST datagrams (``pings'') have an IP and ICMP header, followed by a struct timeval and then an arbitrary number of ``pad'' bytes used to fill out the packet. 8 | 9 | --- 10 | 11 | ## Syntax 12 | ```bash 13 | ping [OPTIONS/FlAGS] [URL] 14 | ``` 15 | --- 16 | 17 | ## Options/Flags 18 | - ### Audible ping. 19 | ```bash 20 | $ ping -a [URL] 21 | ``` 22 | - ### Adaptive ping. 23 | ```bash 24 | $ ping -A [URL] 25 | ``` 26 | - ### Allow pinging a broadcast address. 27 | ```bash 28 | $ ping -b [URL] 29 | ``` 30 | - ### Do not allow ping to change source address of probes. The address is bound to one selected when ping starts. 31 | ```bash 32 | $ ping -B [URL] 33 | ``` 34 | - ### Stop after sending count ECHO_REQUEST packets. With deadline option, ping waits for count ECHO_REPLY packets, until the timeout expires. 35 | ```bash 36 | $ ping -c [COUNT] [URL] 37 | ``` 38 | - ### Set the SO_DEBUG option on the socket being used. Essentially, this socket option is not used by Linux kernel. 39 | ```bash 40 | $ ping -d [URL] 41 | ``` 42 | - ### Print timestamp (unix time + microseconds as in gettimeofday) before each line. 43 | ```bash 44 | $ ping -D [URL] 45 | ``` 46 | - ### Flood ping. For every ECHO_REQUEST sent a period ``.'' is printed, while for ever ECHO_REPLY received a backspace is printed. 47 | ```bash 48 | $ ping -f [URL] 49 | ``` 50 | - ### Show help 51 | ```bash 52 | $ ping -h 53 | ``` 54 | 55 | - ### Wait interval seconds between sending each packet 56 | ```bash 57 | $ ping -i [INTERVAL] [URL] 58 | ``` 59 | - ### Interface is either an address, or an interface name. 60 | ```bash 61 | $ ping -I [INTERFACE] [URL] 62 | ``` 63 | - ### Suppress loopback of multicast packets. This flag only applies if the ping destination is a multicast address. 64 | ```bash 65 | $ ping -L [URL] 66 | ``` 67 | - ### Use mark to tag the packets going out. 68 | ```bash 69 | $ ping -m [MARK] [URL] 70 | ``` 71 | - ### Select Path MTU Discovery strategy. 72 | ```bash 73 | $ ping -M [PMTUDISC_OPT] [URL] 74 | ``` 75 | - ### Numeric output only 76 | ```bash 77 | $ ping -n [URL] 78 | ``` 79 | - ### Report outstanding ICMP ECHO reply before sending next packet. 80 | ```bash 81 | $ ping -o [URL] 82 | ``` 83 | - ### You may specify up to 16 ``pad'' bytes to fill out the packet you send. 84 | ```bash 85 | $ ping -p [PATTERN] [URL] 86 | ``` 87 | - ### Quiet output. Nothing is displayed except the summary lines at startup time and when finished. 88 | ```bash 89 | $ ping -p [PATTERN] [URL] 90 | ``` 91 | - ### Set Quality of Service -related bits in ICMP datagrams. tos can be decimal (ping only) or hex number. 92 | ```bash 93 | $ ping -Q [tos] [URL] 94 | ``` 95 | - ### ping only. Set the IP Time to Live. 96 | ```bash 97 | $ ping -t ttl [URL] 98 | ``` 99 | - ### Record route 100 | ```bash 101 | $ ping -R [URL] 102 | ``` 103 | - ### Show version and exit. 104 | ```bash 105 | $ ping -V 106 | ``` 107 | - ### Time to wait for a response, in seconds. 108 | ```bash 109 | $ ping -W timeout [URL] 110 | ``` 111 | 112 | --- 113 | 114 | ## Exit Status 115 | - **0** = Successful operation; the machine is alive. 116 | - **non-zero** = An error has occurred. Either a malformed argument has been specified, or the machine was not alive. 117 | --- 118 | 119 | ## Author 120 | - Mike Muuss. 121 | 122 | --- 123 | --------------------------------------------------------------------------------