Category: Terminal

  • How to easily find the full path of a command in Ubuntu

    How to easily find the full path of a command in Ubuntu

      If you’re writing scripts or making cron jobs you will need to know the full path of the commands you’re using; rather than just being able to use “ls” you would have to use “/bin/ls” instead. You could use the find command here but there’s a quicker and more elegant way: which. Use it…

  • Using rsync with a non-standard SSH port

      There are many reasons you may be using an SSH port other than 22; perhaps you changed it as a security measure, or perhaps you have multiple machines behind your firewall which you are port forwarding to and thus have to use other ports in addition to 22. Rsync is an extremely powerful file…

  • How to exclude results from grep

      Sometimes you may wish to further filter grep output, such as in the following situation:   # zfs get all | grep compressratio backup01         compressratio         1.23x                  – backup01         refcompressratio      1.00x                  – backup01/data    compressratio         1.50x                  – backup01/data    refcompressratio      1.50x                  – backup01/photos  compressratio         1.05x                  – backup01/photos  refcompressratio      1.05x                  – Here we only really want to see…