Index
A
- alias
- about / Alias
- creating / Creating alias
- listing / Listing all aliases
- removing / Removing an alias
- arithmetic operators / Arithmetic operators
- assignment operator / The assignment operator
- associative array
- about / The associative array
- declaration / The declaration and value assignment
- value assignment / The declaration and value assignment
- operations / Operations on arrays
- at command
- used, for executing scripts / Executing scripts using at
- AWK language
- embedding / Embedding AWK language
- URL / Embedding AWK language
B
- bash completion
- managing, with complete / Managing bash completion with complete
- existing bash completion, viewing / Viewing the existing bash completion
- default bash completion behavior, modifying / Modifying default bash completion behavior
- specification, removing / Removing bash completion specification
- example / An example of bash completion
- created bash completion, running / Running the created bash completion
- bash startup files
- using / Using bash startup files
- .bashrc / .bashrc
- .bash_profile / .bash_profile
- .bash_logout / .bash_logout
- basic file operations
- about / Performing basic file operations
- files, creating / Creating files
- files, modifying / Modifying files
- files, viewing / Viewing files
- files, deleting / Deleting files
- block device file
- about / The block device file
- creating / The block device file
- builtin shell variables
- defining / Builtin shell variables
C
- cat command
- character based translation
- tr, using / Character-based translation using tr
- input characters, deleting / Deleting input characters
- squeezing, to single occurrence / Squeezing to a single occurrence
- character set, inverting / Inverting a character set to be translated
- character classes
- about / Character ranges and classes, Character ranges
- [*alnum*] / Character ranges
- [*alpha*] / Character ranges
- [*digit*] / Character ranges
- [*lower*] / Character ranges
- [*upper*] / Character ranges
- [*blank*] / Character ranges
- [*graph*] / Character ranges
- [*print*] / Character ranges
- [*punct*] / Character ranges
- [*xdigit*] / Character ranges
- matching dates, in mm-dd-yyyy format / Matching dates in mm-dd-yyyy format
- character device file
- about / The block device file
- creating / The block device file
- character ranges
- about / Character ranges and classes, Character ranges
- [a-z] / Character ranges
- [A-Z] / Character ranges
- [0-9] / Character ranges
- [a-zA-Z0-9] / Character ranges
- [h-k] / Character ranges
- [2-46-8j-lB-M] / Character ranges
- regex, for valid shell variable / Regex for a valid shell variable
- command completion
- about / Command completion
- bash completion, managing with complete / Managing bash completion with complete
- bash completion, writing for application / Writing bash completion for your own application
- command line parameters
- passing, to script / Passing command line parameters to script
- arguments, reading in script / Reading arguments in scripts
- command line arguments, shifting / Shifting command line arguments
- command line options, processing in script / Processing command line options in a script
- commands
- scheduling / Scheduling commands
- Common UNIX Printing System (CUPS)
- about / Socket file
- comparison operators / Comparison operators
- conditional statements
- using, with if and else / Using conditional statements with if and else, Simple if and else
- elif statement / The if, elif, and else statements
- if statement / The if, elif, and else statements
- else statement / The if, elif, and else statements
- nested if / Nested if
- configuration files
- about / Configuration files
- viewing / Viewing and modifying configuration files
- modifying / Viewing and modifying configuration files
- construct commands
- defining, eval used / Construct commands using eval
- cron configuration / Cron configuration
- cron daemon / Cron daemon
- Cron jobs
- defining / Cron jobs
- cron daemon / Cron daemon
- cron configuration / Cron configuration
- crontab entries / Crontab entries
- crontab entries
- writing / Crontab entries
- special strings / Special strings in Crontab
- managing / Managing the crontab entry
- listing / Listing crontab entries
- editing / Editing crontab entries
- removing / Removing crontab entries
- cut-based selection
- about / The Cut-based selection, Cutting across columns
- text selection, in files / Text selection in files
- cut command, options
- -b LIST / The Cut-based selection
- -c LIST / The Cut-based selection
- -d DELIM / The Cut-based selection
- -f LIST / The Cut-based selection
- --complement / The Cut-based selection
- -s / The Cut-based selection
- --output-delimiter=STRING / The Cut-based selection
D
- debugging, scripts
- performing / Debugging your scripts
- echo command used / Debugging using echo
- entire script, debugging with -x option / Debugging an entire script using -x
- section, debugging with set options / Debugging sections of a script using the set options
- default environment
- defining / Knowing the default environment
- default history behavior
- modifying / Modifying the default history behavior
- diff command
- options / Files comparison using diff
- directory file
- about / Directory file
E
- /etc/passwd
- URL / Embedding AWK language
- environment variables
- versus shell variables / Differences between shell and environment variables
- about / Differences between shell and environment variables
- exit codes
- about / Exit codes
- with special meaning / Exit codes with a special meaning
- Exit code 0 / Exit codes with a special meaning
- Exit code 1 / Exit codes with a special meaning
- Exit code 2 / Exit codes with a special meaning
- Exit code 126 / Exit codes with a special meaning
- Exit code 127 / Exit codes with a special meaning
- Exit code 128+n / Exit codes with a special meaning
- expressions, testing with test command
- about / Testing expressions with a test
- file checks / File checks
- arithmetic checks / Arithmetic checks
- string checks / String checks
- expression checks / Expression checks
F
- files
- creating / Creating files
- directory file / Directory file
- regular file / Regular file
- viewing / Viewing files
- viewing, ls command used / Viewing files
- content, viewing with cat command / Viewing content using cat
- viewing, more command used / more and less
- viewing, less command used / more and less
- deleting / Deleting files
- regular file, deleting / Deleting a regular file
- directory, deleting / Deleting a directory
- copying / Moving and copying files, Copying files
- moving / Moving files
- directory, moving to new location / Moving a directory to a new location
- renaming / Renaming a file
- copying locally / Copying files locally
- copying, to another location / Copying a file to another location
- copying remotely, scp command used / Copying files remotely
- copying, to remote server / Copying files to a remote server
- comparing / Comparing files
- comparing, diff command used / Files comparison using diff, Example
- searching / Finding files
- searching, according to usecase / Searching files according to use case
- finding and deleting, based on inode number / Finding and deleting a file based on inode number
- link, creating / Links to a file
- special files / Special files
- temporary files / Temporary files
- permissions / Permission and ownership
- ownership / Permission and ownership
- opened files list, obtaining / Getting the list of open files
- configuration files / Configuration files
- fle descriptors
- about / File descriptors
- for loop
- about / Looping around with for
- simple iteration / Simple iteration
- command output, iterating over / Iterating over a command output
- range, specifying / Specifying a range to the for loop
- format modifiers
- defining / Interacting with shell
- format specification
- used, for printing different data type format / Interacting with shell
- functions
- using / Using functions and positional parameters
- calling in bash / Calling a function in bash
- parameters, passing to / Passing parameters to functions
G
- grep command
- used, for filtering output / Filtering an output using grep
- syntax / Syntax, Looking for a pattern in a file
- uses / A few more grep usages
- searching, in a binary file / Searching in a binary file
- searching, in a directory / Searching in a directory
- files/directories, excluding from search / Excluding files/directories from a search
- filename, displaying with matching pattern / Display a filename with a matching pattern
- exact word, matching / Matching an exact word
- output, editing with sed command / Editing output using sed, String substitution using s
- multiple substitutions / Multiple substitutions
- grep command, options
H
- head command
- about / Filtering based on lines—head and tail
- used, for printing lines / Printing lines using head, Printing the first few bytes, Checking log entries
- used, for finding lines / Finding any line in a file
- head command, options
- -c [-] K / Printing lines using head
- -n [-]K / Printing lines using head
- -q / Printing lines using head
- -v / Printing lines using head
- Hello world
- defining, in shell / Hello World in shell
- interacting, with shell / Interacting with shell
- bash script file, creating / Let's make it scripted
- history, shell
- defining / Knowing your history
- shortcuts / Handy shortcuts for seeing the history
- history builtin command
- about / The history builtin command
- history shell builtin command
- defining / The history builtin command
I
- indexed array
- about / Indexed arrays
- array declaration / Array declaration and value assignment
- value assignment / Array declaration and value assignment
- operations / Operations on arrays
- init-based system
- URL / systemd
- input text
- sorting / Sorting an input text
- single file, sorting / Sorting a single file
- multiple files, sorting / Sorting a single file
- output, redirecting to sort / Redirecting output to sort
- inter-process communication
- about / Inter-process communication
- named pipes / Inter-process communication
- shared memory / Inter-process communication
- message queue / Inter-process communication
- semaphores / Inter-process communication
- information about IPC, ipcs command used / Information on IPC using ipcs
- information, listing / Listing information provided by IPCs
- PID of processes, knowing / Knowing processes' PID who recently did IPCs
K
- killall command / Using the killall command
- kill command / Using the kill command
L
- languages
- embedding / Embedding languages
- links, between files
- soft link / Soft link
- hard link / Hard link
- hard link, versus soft link / Difference between hard link and soft link
- logical operators / Logical operators
M
- matching dates
- valid month, matching / Matching a valid month
- valid day, matching / Matching a valid day
- valid year in date, matching / Matching the valid year in a date
- valid months, combining with days and regex / Combining valid months, days, and years regex to form valid dates
- metacharacters, regular expression
- about / Regular expression metacharacters
- * (Asterisk) / Regular expression metacharacters
- + (Plus) / Regular expression metacharacters
- ? / Regular expression metacharacters
- . (Dot) / Regular expression metacharacters
- ^ / Regular expression metacharacters
- $ / Regular expression metacharacters
- [... ] / Regular expression metacharacters
- [^... ] / Regular expression metacharacters
- | (Bar) / Regular expression metacharacters
- \{X\} / Regular expression metacharacters
- \{X,Y\} / Regular expression metacharacters
- \(...\) / Regular expression metacharacters
- \< / Regular expression metacharacters
- \> / Regular expression metacharacters
- \ / Regular expression metacharacters
N
- named pipe file
- about / Named pipe file
- creating / Named pipe file
- nice command / Using nice
O
- opened files
- list, obtaining / Getting the list of open files
- files opened by specific application, listing / Knowing the files opened by a specific application
- applications, listing / Listing the applications that opened a file
- files opened by specific user, listing / Knowing the files opened by a user
- operators
- defining / Operators
- assignment operator / The assignment operator
- arithmetic operators / Arithmetic operators
- logical operators / Logical operators
- comparison operators / Comparison operators
- >> / Redirecting the standard I/O and error streams
- < / Redirecting the standard I/O and error streams
- >& / Redirecting the standard I/O and error streams
- >>& / Redirecting the standard I/O and error streams
- | / Redirecting the standard I/O and error streams
- options, at command
- -f FILE / Executing scripts using at
- -l / Executing scripts using at
- -m / Executing scripts using at
- -M / Executing scripts using at
- -r / Executing scripts using at
- -t time / Executing scripts using at
- -c job_number / Executing scripts using at
- -v / Executing scripts using at
- options, crontab
- ownership, files
- about / Permission and ownership
- viewing / Viewing the ownership and permission of files
- owner, changing / Changing the owner and group, Changing a file's owner
- group ownership, changing / Changing group ownership
P
- parameters
- passing, to functions / Passing parameters to functions
- permissions, files
- about / Permission and ownership
- viewing / Viewing the ownership and permission of files
- changing / Changing permission
- pipe
- about / Pipe
- pipeline
- popd command
- about / pushd and popd
- positional parameters
- POSIX (Portable Operating System Interface) / Exit codes
- processes
- listing / Listing and monitoring processes
- monitoring / Monitoring processes
- processes, listing
- about / Listing processes
- syntax / Syntax
- simple process selection / Simple process selection
- process selection by list / Process selection by list
- output format control / Output format control
- processes with details / Listing all processes with details
- processes run by user / Listing all processes run by a user
- processes running in current terminal / Processes running in the current terminal
- processes by command name / Listing processes by a command name
- tree format display / Tree format display of processes
- Process ID (PID) / Knowing the files opened by a specific application
- process management
- about / Process management
- process, creating / Process creation and execution
- process, executing / Process creation and execution
- process, terminating / Process termination
- process scheduling priorities
- about / Process scheduling priorities
- changing / Changing scheduling priorities
- changing, nice command used / Using nice
- changing, renice command used / Using renice
- process substitution
- about / Process substitution
- output of two processes, comparing / Diffing the output of two processes
- process termination
- performing / Process termination
- kill command, used / Using the kill command
- killall command, used / Using the killall command, Using the pkill command
- pstree command / Tree format display of processes
- pushd command
- about / pushd and popd
- Python
- Python languages
- embedding / Embedding Python language
R
- ranges
- regular expression
- about / Regular expressions
- metacharacters / Regular expression metacharacters
- classes / Character ranges and classes, Character ranges
- character ranges / Character ranges
- creating / Character ranges
- URL / Combining valid months, days, and years regex to form valid dates
- regular file
- about / Regular file
- touch command / Touch command
- command line editors, using / Using the command line editors
- cat command, using / Using the cat command
- command output, redirecting / Redirecting the command's output
- renice command / Using renice
- resolution path, symbolic link
S
- scheduled tasks
- listing / Listing scheduled tasks
- removing / Removing scheduled tasks
- scp command
- options / Copying files remotely
- script file
- scheduling / Scheduling a script file
- scripts
- exiting from / Exiting from scripts and exit codes
- with exit codes / Script with exit codes
- modularizing / Modularizing your scripts
- source / Source to a script file
- debugging / Debugging your scripts
- executing, at command used / Executing scripts using at
- sed command, flags
- sed command, options
- -n / Editing output using sed
- -e script / Editing output using sed
- -r / Editing output using sed
- -l N / Editing output using sed
- --posix / Editing output using sed
- -u / Editing output using sed
- select loop
- using / Loop using select
- services
- managing / Managing services
- status / Status of a service
- enabling / Enabling and disabling services
- disabling / Enabling and disabling services
- starting / Start and stop a service
- stopping / Start and stop a service
- set command
- using / Make bash behave using set
- exit, on first failure / Exit on the first failure
- SETs / Character-based translation using tr
- shared library
- URL / .bashrc
- shell environment
- viewing / Viewing a shell environment
- printenv / printenv
- env / env
- modifying / Modifying a shell environment
- environment variables, creating / Creating environment variables
- environment variables, modifying / Modifying environment variables
- environment variables, deleting / Deleting environment variables
- shell expansions
- defining / Shell expansions
- ~ (Tilde) / ~ (Tilde)
- * (Asterisk) / * (Asterisk)
- ? (Question mark) / ? (Question mark)
- [ ] (Square brackets) / [ ] (Square brackets)
- { } (Curly brackets) / { } (Curly brackets)
- shell script library
- creating / Creating a shell script library
- loading / Loading a shell script library
- calling in bash / Calling a shell library in bash
- calling, in another shell script / Calling shell library in another shell script
- shell variables
- used, in bash shell / Builtin shell variables
- versus environment variables / Differences between shell and environment variables
- about / Differences between shell and environment variables
- used, for controlling history / Shell variables controlling the history
- shell variables, bash shell
- BASH / Builtin shell variables
- BASH_VERSION / Builtin shell variables
- BASHPID / Builtin shell variables
- EUID / Builtin shell variables
- HOME / Builtin shell variables
- HOSTNAME / Builtin shell variables
- PATH / Builtin shell variables
- PPID / Builtin shell variables
- PWD / Builtin shell variables
- shortcuts, shell
- defining / Handy shortcuts for seeing the history
- [Ctrl + r] / [Ctrl + r]
- up and down arrow key / Up and down arrow key
- !! / !!
- !(search_string) / !(search_string)
- !?(search_string) / !?(search_string)
- signals
- about / Signals
- frequently used signals / Available signals
- Default action section / Available signals
- socket file
- about / Socket file
- sort command, options
- -b / Sorting an input text
- -d / Sorting an input text
- -f / Sorting an input text
- -i / Sorting an input text
- -M / Sorting an input text
- -n / Sorting an input text
- -r / Sorting an input text
- -h / Sorting an input text
- -u / Sorting an input text
- -o file / Sorting an input text
- -m / Sorting an input text
- -k n / Sorting an input text
- source
- about / Source to a script file
- syntax / Syntax
- special files
- about / Special files
- block device file / The block device file
- character device file / The block device file
- named pipe file / Named pipe file
- socket file / Socket file
- standard I/O and error streams
- about / Standard I/O and error streams
- stdin file / Standard I/O and error streams
- stdout file / Standard I/O and error streams
- stderr file / Standard I/O and error streams
- file descriptors / File descriptors
- redirecting / Redirecting the standard I/O and error streams, Redirecting standard output
- standard input, redirecting / Redirecting standard input
- standard error, redirecting / Redirecting standard errors, Multiple redirection
- stdout
- passing as parameter, xargs used / Passing stdout as a parameter using xargs
- stream
- duplicating, with tee command / Duplicating a stream using tee
- output, writing, to stdout / Writing an output to stdout and appending to a file
- appending, to file / Writing an output to stdout and appending to a file
- output, sending to multiple commands / Sending an output to multiple commands
- switch
- about / Switch to my choice
- syntax / Switch to my choice
- systemd
- defining / systemd
- unit files, defining / systemd units
- system logs
- viewing / Viewing system logs
- latest log entries, viewing / Viewing the latest log entries
- particular time interval logs, viewing / Viewing logs of a particular time interval
T
- tail command
- tail command, options
- -c [+]K / Printing lines using tail
- -n [+]K / Printing lines using tail
- -f [{name|descriptor}] / Printing lines using tail
- --retry / Printing lines using tail
- --max-unchanged-stats=N / Printing lines using tail
- --pid=PID / Printing lines using tail
- -q / Printing lines using tail
- -F / Printing lines using tail
- -s N / Printing lines using tail
- -v / Printing lines using tail
- task management
- defining / Task management
- tasks, running in background / Running tasks in the background
- running task, sending to background / Sending a running task to the background
- background tasks, listing / Listing background tasks
- tasks, moving to foreground / Moving tasks to the foreground
- tasks, terminating / Terminating tasks
- tasks
- running, at specific time / Running tasks at a specific time
- tee command
- used, for duplicating stream / Duplicating a stream using tee
- tee command, options
- -a, --append / Duplicating a stream using tee
- -i, --ignore- / Duplicating a stream using tee
- temporary files
- about / Temporary files
- creating, mktemp used / Creating a temporary file using mktemp
- traps
- about / Traps
- tr command
- used, for character based translation / Character-based translation using tr
- tr commands, options
U
- uniq command, options
- unique text
- sorting / Sorting and finding unique text
- finding / Sorting and finding unique text
- input text, sorting / Sorting an input text
- unique elements, filtering / Filtering unique elements, Unique elements in a file
- unit files
- defining / systemd units
- until loop
- about / The until loop
- using / The until loop
V
- variables
- defining / Define variables of choice
- nomenclature / Nomenclature
- value, assigning / Assigning a value
- value, accessing / Accessing a value
- constant variables / Constant variables
- reading, from user input / Reading variables from a user input
- setting / Setting/unsetting variables
- unsetting / Setting/unsetting variables
- vim
- reference link / Using the command line editors
W
- while loop
- about / The while loop
- using / The while loop
X
- xargs command
- about / Passing stdout as a parameter using xargs
- syntax / Passing stdout as a parameter using xargs
- basic operations / Basic operations with xargs
- for finding file with maximum size / Using xargs to find a file with the maximum size
- files, archiving with given pattern / Archiving files with a given pattern