Tag Archives: Linux

The best Alias for ls

The best alias for ls is ls –halF It is easy to remember, and produces easy to read output with human readable file sizes and / marks present by the directory names..

Posted in Computing Notes | Also tagged | Comments closed

Install iftop on Oracle Linux 9

dnf install oracle-epel-release-el9 dnf install iftop iptraf is already in the default repositories.

Posted in Computing Notes | Also tagged , , , | Comments closed

A good version of ll

A really good version of the ll alias is: ls –lahF, although on some versions ls –lahp looks better than F.

Posted in Computing Notes | Also tagged | Comments closed

LS alias and Mozilla DRM bar

Some useful aliases that are not always preconfigured on every Linux version: alias ll=’ls -alF’ alias la=’ls -A’ alias l=’ls –CF’ To eliminate the DRM warning in Firefox and Librewolf without enable DRM, add this to “userChrome.css”: notification[value="drmContentDisabled"]{ display:none !important; } toolkit.legacyUserProfileCustomizations.stylesheets must be set to true in about config.

Posted in Computing Notes | Also tagged , | Comments closed

Double Sided Scan and PDF

The following script scans PDFs via an auto-document feeder in Hp-Lip and then collates the pages to the correct order when there are reverse sides. No scans will be saved if no data is transmitted for the second set of scans. The second set of scans is the reverse of the pages. #!/usr/bin/env bash YMD=$(date [...]

Posted in Computing Notes | Also tagged , , , | Comments closed

Automated Database Restart

Here is a script that checks to ensure the database is running and restarts the service if it is not running.  This was used on a very low memory server to ensure a database remained operational, despite it sometimes crashing due to out of memory errors. #!/bin/bash timestamp=”$(date)” systemctl stop httpd && echo “${timestamp}” Stopping [...]

Posted in Computing Notes | Also tagged , , , | Comments closed

AppImage Integration

To install AppImages and integrate them with the desktop environment like a conventional package,  use the AppImage Launcher. LibreWolf’s documentation contains a how-to document on using AppImage Launcher.

Posted in Computing Notes | Also tagged , | Comments closed

Functions in Bash

This is the code for a function in Bash script. #!/bin/bash # Define a function greet() { echo “Hello, $1″ } # Call the function with “World” as the argument greet “World”

Posted in Computing Notes | Also tagged | Comments closed

Looping through filenames in Bash

To loop through the subdirectories in a folder, when those subdirectories may contain spaces in the file names, use the following procedure. OLD_IFS=$IFS && IFS=$’\n’ for directory in $HOME/somefolder/*/; do echo “some code here” done IFS=$OLD_IFS  

Posted in Computing Notes | Also tagged | Comments closed

Bash and *nix Note no. 2

  This document contains some notes on .bashrc for use with Linux systems. alias ll=’ls -alF’ alias la=’ls -A’ alias l=’ls –CF’ if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi The preceding two blocks come standard on Ubuntu as of version 2022.04. One tweak for WSL2 on Windows might be the addition of this [...]

Posted in Computing Notes | Also tagged , , , | Comments closed