Debian 12 PATH and X11

May 18th, 2024 – 4:46 am
Tagged as: Computing Note

A few quirks with Debain 12 include that path not being set in similar fashion to Fedora, Ubuntu, and other distributions.  One must regularly set export PATH=$PATH:/usr/sbin In Gnome, applications will open on the server instead of the client when using X11 forwarding.  This will occur even though xcalc opens on the client normally.  The [...]

The best Alias for ls

March 2nd, 2024 – 11:14 pm
Tagged as: Computing Note

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..

A good version of ll

February 20th, 2024 – 3:37 am
Tagged as: Computing Note

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

Double Sided Scan and PDF

February 1st, 2024 – 1:15 pm
Tagged as: Computing Note

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 [...]

Automated Database Restart

January 21st, 2024 – 7:41 pm
Tagged as: Computing Note

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 [...]

Functions in Bash

January 21st, 2024 – 2:57 pm
Tagged as: Computing Note

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”

Looping through filenames in Bash

January 21st, 2024 – 1:59 am
Tagged as: Computing Note

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/localsource/*/; do echo “some code here” done IFS=$OLD_IFS  

Bash and *nix Note no. 2

January 10th, 2024 – 6:18 am
Tagged as: Computing Note

  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 [...]

Bash and *nix Note no. 1

July 7th, 2023 – 11:41 pm
Tagged as: Computing Note

7 July 2023: Ubuntu 22.04′s update notifier seems to not include the option to configure any settings, at least after certain conditions exist on a particular system.  To stop the notifier from appearing.  To stop the notifier from appearing use sudo apt-get remove update-notifier 7 July 2023: There are non-snap builds of ungoogled-chromium for Ubuntu [...]