atool – manage file archives of various types

$ atool --help
Usage: atool [OPTION]... ARCHIVE [FILE]...
       atool -e [OPTION]... [ARCHIVE]...
Manage file archives of various types.

  -l, --list               list files in archive (als)
  -x, --extract            extract files from archive (aunpack)
  -X, --extract-to=PATH    extract archive to specified directory
  -a, --add                create archive (apack)
  -c, --cat                extract file to standard out (acat)
  -d, --diff               generate a diff between two archives (adiff)
  -r, --repack             repack archives to a different format (arepack)
      --help               display this help and exit
      --version            output version information and exit

atool homepage

Managing .pacnew Files

Using Meld to Update Differences.
Using meld in a loop can be used to update configuration files. This
script will loop through the files one by one then prompt to delete
the .pacnew file.

# Merge new *.pacnew configuration files with their originals

pacnew=$(find /etc -type f -name "*.pacnew")

# Check if any .pacnew configurations are found
if [[ -z "$pacnew" ]]; then
  echo " No configurations to update"

for config in $pacnew; do
  # Diff original and new configuration to merge
  gksudo meld ${config%\.*} $config &
  # Remove .pacnew file?
  while true; do
    read -p " Delete \""$config"\"? (Y/n): " Yn
    case $Yn in
      [Yy]* ) sudo rm "$config" && \
              echo " Deleted \""$config"\"."
              break                         ;;
      [Nn]* ) break                         ;;
      *     ) echo " Answer (Y)es or (n)o." ;;


Monitorowanie ruchu sieciowego

Bandwidth Monitor NG

Bandwidth Monitor NG is a small and simple console-based live network and disk io bandwidth monitor for Linux, BSD, Solaris, Mac OS X and others.



iftop does for network usage what top(1) does for CPU usage. It listens to network traffic on a named interface and displays a table of current bandwidth usage by pairs of hosts. Handy for answering the question “why is our ADSL link so slow?”.



NetHogs is a small ‘net top’ tool. Instead of breaking the traffic down per protocol or per subnet, like most tools do, it groups bandwidth by process. NetHogs does not rely on a special kernel module to be loaded. If there’s suddenly a lot of network traffic, you can fire up NetHogs and immediately see which PID is causing this. This makes it easy to indentify programs that have gone wild and are suddenly taking up your bandwidth.