Category: Terminal

  • How do you check website links and jpgs etc. recursively?

    LinkChecker is a great way of doing this;   http://wummel.github.io/linkchecker/   Other people’s sites may have robots.txt files that prevent you from using this tool on their sites but it’s darn handy for pulling up broken links on your own sites. This is a valid alternative to the Integrity tool on Mac if you’re comfortable…

  • How to kill a KVM virtual machine in Promox via the command line or terminal

      Sometimes a Proxmox KVM VM will stop responding to the GUI’s attempts to shut it down; fortunately it’s easy to shut it down from the command line. Make note of the VM ID (next to the name of the VM in the left pane of the Proxmox GUI), log into the server via SSH…

  • Awk: Remove everything after the first word in each line

      Another awk question. How to remove everything after the first word in each line? E.g., if we wanted to remove everything but the names in this input (FILENAME.txt):   Anna 123 09123 Main Street Bob 109 09800 Smith Street Joe 0981 123123 King Street   We can use awk like so:   awk ‘{…

  • Awk: Remove first line of file

      Short and sweet – when piping data through awk, how do we remove the first line of the input?   awk ‘{if (NR!=1) {print}}’   e.g.   cat FILENAME.txt | awk ‘{if (NR!=1) {print}}’   Done!

  • ZFS: Adding a new mirror to an existing ZFS pool

    ZFS: Adding a new mirror to an existing ZFS pool

      Mirrored vdevs are great for performance and it is quite straight-forward to add a mirrored vdev to an existing pool (presumably one with one or more similar vdevs already):   zpool add [poolname] mirror [device01] [device02] [device03]   If it’s a two-way mirror you will only have two devices in the above. An example…

  • Ubuntu: How to delete a user

    black single ladies looking for love

      In Ubuntu 12.04 and 12.10, to delete an additional user you have created, use the following:   sudo deluser [username]   By example, if we wanted to delete a user we created called “test”, we would run:   sudo deluser test   Which gives:   Removing user `test’ … Warning: group `test’ has no…

  • https://www.sotechdesign.com.au/milliseconds-to-date/

    glasgow hookup sites

      To add an existing user to a second group, use the following command:   sudo usermod -a -G [group] [user]   e.g.:   sudo usermod -a -G geeks bob   This will add the user bob to the group geeks.

  • How to remove/delete old or unused kernels in Ubuntu

    How to remove/delete old or unused kernels in Ubuntu

      If you have upgraded your kernel you will have found that Ubuntu keeps the older ones around, which can be handy if something breaks in the newer kernel and you have to boot from your old system. Over time, however, these can add up in terms of the amount of space consumed – at…

  • How to see individual CPU core loads in Ubuntu

    How to see individual CPU core loads in Ubuntu

      This is an interesting one – if you have the need to monitor your CPU usage individually across cores it’s actually quite easy with the top command. Simply run top and hit “1” – your output will go from:   to:   In this case the server is a hexcore (0-5 cores shown, 6…

  • How to kill a process after a set period of time

    How to kill a process after a set period of time

      Knowing how to limit how long a process will run for is quite useful, particularly when you have daily backup scripts and the like which may at times run more than 24 hours; having multiple processes attempting to synchronize the same files can waste time, bandwidth and CPU power needlessly. The command we will…