Hoping that 2017 will be a good year in some important ways, I've gathered 17 useful Unix tricks to make your hours on the command line a little more productive.

1: Oops!

For all the times we forget to insert "sudo" before a command that we want to run as root, the oops alias might come in handy.

alias oops='sudo !!'

This alias will rerun the previous command with "sudo" prepended to it. You can call it something other than "oops" if you like -- whatever you're likely to remember when you forget to use sudo.

2: Making files executable

A quick way to set up execute permissions for your scripts is to use an alias that is preset with the permissions you're most likely to use. For example, you can easily create an alias to give execute permission across the board using an "ax" (all execute) like this:

To read this article in full or to leave a comment, please click here