A collection of shell scripts designed to automate system operations and enhance workflow within the GNU/Linux terminal environment.
Important
ls_dynamicandcdwfromcdw.shand/orls_dynamic.shneeds to be present in your shell config file in order to run the scripts to run.- Proper keybindings must also be set up for
lsandcdto runls_dynamicandcdwrespectively.
audio-and-video-playback– Play audio and video directly in (audio) from (video) terminal.cdw– Track the 25 most used file paths.ls_dynamic– Adds thels_dynamicfunction when navigating withcd. It clears screen and runs eza with icons, which displays content of current path—relieving the user from having to rundir,tree, orlsmanually to see the content of the navigated directory.ls_ft– List the content of current directory by file extension.ls_open– A function that displays all navigable subdirectories within the current directory.mount-unmount-drives– Mount and unmount external drives.mv_files– shorthand for bulk moving all files and folders, all folders or all files respectively.terminal_bookmarks– Bookmark file paths and navigate set bookmarks with the F1-F12-keys.
Copy paste the content of the files into either your .bashrc or your .zshrc depending on what shell you are using.
- make a new directory in your home directory, call it
gnulinux-utils, for instance.
mkdir~/gnulinux-utils - make a new file for the script; for instance:
touch~/gnulinux-utils/mount-unmount-drives.sh - Copy paste and save the content of same file in this repo to said file.
-
Initialize a new Git repository (meaning in this context to create a new directory for the script files.)
cd ~/
git init gnulinux-utils -
Change into the repository directory
cd gnulinux-utils -
Enable sparse-checkout mode
git sparse-checkout init --cone -
Specify the file to check out (mount-unmount-drives.sh)
git sparse-checkout set mount-unmount-drives.sh -
Add the remote repository
git remote add origin https://github.com/Z-F-x/gnulinux-utils.git -
Fetch the repository content
git fetch -
Checkout the master branch (or another branch if needed)
git checkout master -
Delete all
.shfiles except formount-unmount-drives.sh(replace file name with the script/file you want installed), all other will be deleted:
find . -type f -name "*.sh" ! -name "mount-unmount-drives.sh" -exec rm -f {} + -
Verify that only mount-unmount-drives.sh is left
ls *.sh
Clone the repo in your home directory (this is the way I've set it up but you can place it wherever you like as long as you link it to the correct path in your ur .bashrc or your .zshrc i.e., your shell config files.
-
Clone the Git repository into your home directory (or any other directory just remember to link it in your script config file i.e.,
.bashrcor.zshrc.
git clone https://github.com/Z-F-x/gnulinux-utils.git ~/
1.1 Change directory to repository
cdgnulinux-utils -
Append source commands for all
.shfiles in the cloned directory to.zshrcor.bashrcconfig file.
For .zshrc:
2.1 echo "for file in ~/gnulinux-utils/*.sh; do source \$file; done" >> ~/.zshrc
For .bashrc:
2.2 echo "for file in ~/gnulinux-utils/*.sh; do source \$file; done" >> ~/.bashrc
- Reload
.zshrcto apply the changes:
source ~/.zshrc
- Enter
playaudioFileName.mp3 - Enter
playin a path that contains audio files and select an audio file from fzf dropdown
NOTE: Valid audio file formats are: .wma, .mp3, .wav, .ogg.
- Enter
vlcvideoFileName.mp4 - Enter
vlcand press tab to cycle select video files - Enter
vlcand select vido file from fzf dropdown
enter cdw in terminal to view and select logged file paths. Paths are logged automatically with cd
Enter cd as you would normally.
Expected result:
clear is ran screen and displays the content of file with eza --icons:

alias lsft="list_specific_file_type_eza" # list files by extension, requires an argument. For example: lsft .txt alias sbft="list_files_sort_extension" #c alias lsfth="list_files_sort_extension_hidden" #Lits only files by extension including hidden files, requires argument. alias lsfta="list_files_and_folders_sort_by_extensions" #require arguments
lsft .txt
sbft .txt
List only files including hidden files, sort by extension
lsfth .txt
lsfta .txt
NOTE: See all aliases for this functionality in the script file.
- Enter in your terminal:
ls_open
- Hit enter to navigate
Alernatively: lsnav, nav, open, opendir, dopen, diropen, navigate, folder
- Enter in your terminal:
mount_external
-
Select the drive you want to mount from th
fzfdropdown menu -
Provide a drive name.
-
Drive uccessfully mounted
- Enter in your terminal:
unmount_external
- Select the drive you want to unmount from the fzf dropdown menu.
Move all files, excluding folders
mvfiles
Move all files and folders
mvall
bookmark set 1
NOTE: valid set options are 1 through 12 setting the set bookmark to the corresponding F-key.
bookmark 1
bookmark
- NOTE: Known Issue. Formatting is not pretty. Will be fixed.
F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, and F12.










