Linux School TechAdd elapsed time since current login to promptHow to calculate the time of the last login and the time elapsed since the active login in Linux? How do we add them to the $PS1 prompt…May 7May 7
Linux School TechDifference between etime and etimes formats in ps commandThe etime and etimes options in the ps command are used to display the elapsed time since a process was started. They differ in the format…Mar 26Mar 26
Linux School TechWhat Is The $@ Variable In BashIn Bash scripting, $@ is a special variable that expands to all the positional parameters, starting from one. When used within double…Feb 24Feb 24
Linux School TechWhat Is ARP Table In Linux?The ARP table, also known as the ARP cache, is a temporary storage for IP to MAC address mappings in a Linux system. The Address Resolution…Feb 19Feb 19
Linux School TechBash script to list network interface namesUsing the commands ip and awk, a Linux shell script has been written that extracts the name of the network interface and its alternative…Feb 18Feb 18
Linux School TechUnderstanding IFS In Bash ScriptingIn Bash, the “IFS” (Internal Field Separator) is a special variable that defines the character or characters used to separate a pattern…Feb 13Feb 13
Linux School TechUnderstanding The $BASH_REMATCH In Bash$BASH_REMATCH is a special array variable in the Bash shell that stores the results of matching a regular expression using the =~ operator…Feb 11Feb 11
Linux School TechCreating Timestamps With The ts Command In LinuxThe ts command is a utility in the moreutils package for Linux that prefixes a timestamp to each line of output. When you run ts, it waits…Feb 8Feb 8
Linux School TechBash Script for Calculating Total File Sizes by ExtensionThis bash script calculates the total size and count of files in the current directory grouped by their file extensions. It first declares…Feb 4Feb 4
Linux School TechCreating And Using An Associative Array In A Bash ScriptAn associative array in Bash is a data structure for storing key-value pairs. Each key is unique and has an associated value. Associative…Feb 4Feb 4