JM's Site


Home

 

Scripts

Shell scripts for Unix-like systems, with various purposes

 

randstr

'randstr' is a Bash script that prints random alphanumeric character strings. It uses only commands that are commonly included in Unix-like systems.

Current version: 1.5

 

srchbin

'srchbin' is a Bash script that searches the locations specified in the current environment PATH variable for files whose names contain a given search term. It is useful for determining forgotten command names and finding unknown commands.

Current version: 1.5

 

scrlaunch

'scrlaunch' is a Bash script that utilizes 'screen' to run commands in the background. The commands passed as arguments are executed in a new detached screen instance so that any command line input and output takes place inside the screen instance. It is useful for launching applications from a terminal instance without tying up its input and output. Naturally, GNU Screen must be installed.

Current version: 1.2

 

rm_r_prompt

'rm_r_prompt' is a Bash script that utilizes 'zenity' to prompt for the removal of files and directories passed as arguments. It is useful for adding a custom menu item to a file manager for permanent removal of items while taking a precaution against accidental removals. Thus, this script is intended for automation rather than for manual usage from a terminal. If the user does not have write permission for the selected files, then the user will be prompted for password in order to authenticate the deletion(s) using sudo (if applicable). Files for which the user does have write permission will be deleted before prompting for password. Thus, if the password prompt fails for write-protected files, then at least any files that are not write-protected will be deleted. Note that directories are removed recursively. Naturally, Zenity must be installed.

Current version: 1.3

 

wipedisk

'wipedisk' is a Bash script that utilizes either dcfldd or dd to write random and/or null bytes to a device in a configurable number of passes. It is intended for securely erasing all of the data on a hard drisk or partition. Note: wiping partitions is currently not supported on disks with BSD disklabels. Furthermore, a compatible version of the 'fdisk' utility is required. As a result, this script does not work on Mac OSX; it is primarily intended for use in Linux systems.

Current version: 1.2

When booting from a portable disk such as a GParted live CD, it can be useful to execute this script (as root) using cURL or Wget using one of the following commands:

bash <(curl -s https://hummingnerd.net/files/wipedisk) #ARGUMENTS HERE#
bash <(wget -qO- https://hummingnerd.net/files/wipedisk) #ARGUMENTS HERE#

 

 

 

 

 

 

 

 

 

 

Free DNS