This is how to get the weather report for any American zip code with the Linux command-line. Type sudo apt-get install weather-util to install this utility on Linux Mint 14. In this example we are checking New York City. [email protected] ~ $ weather 10001 Current conditions at New York City Central Park, NY Last updated …

If you want to put line numbers in the output of a command; then feed it through the nl command. This will put the required line numbers there for you. [[email protected]]:~/Desktop> ls -hula | nl 1 total 452K 2 drwxr-xr-x 3 john john 4.0K Nov 14 10:46 . 3 drwxr-xr-x 46 john john 4.0K Nov …

The ldd command will print out a list of all libraries that an executable is linked against. This is the output for a simple “Hello World” command. 20:15:31 [email protected] ($ ldd ./a.out linux-vdso.so.1 => (0x00007fff171ff000) libc.so.6 => /lib64/libc.so.6 (0x00007fe56ef58000) /lib64/ld-linux-x86-64.so.2 (0x00007fe56f2e8000) 20:15:49 [email protected] ($20:15:31 [email protected] ($ ldd ./a.out linux-vdso.so.1 => (0x00007fff171ff000) libc.so.6 => /lib64/libc.so.6 (0x00007fe56ef58000) …

This is a BASH shell script that will print all of the available colours using the BASH shell. The colours are useful for colorizing your BASH prompt to differentiate it from your shell output. #!/bin/bash # colors.sh – Print out all the different ECMA color-mod combos # # 2008 – Mike Golvach – [email protected] # …

To recall the last entered command on the Linux console, press the Ctrl-P key shortcut. You may also press the up arrow to recall the command, but the Ctrl-P shortcut is another good way to perform his feat. The CTRL-A shortcut will jump to the beginning of the line you are currently typing and CTRL-E …

Changing permissions of a file. To add executable permissions for all categories of a file, you would use chmod a+x foo. To add executable permissions for only the current user, you would use: chmod go-wx foochmod go-wx foo Or you could usechmod +x: chmod +x foochmod +x foo That is a simpler way of achieving …

Using the dircolors command in your ~/.bashrc. The dircolors command as used in your ~/.bashrc will set the colours of the various files and directories that are shown with the ls(1) command. Use the command dircolors –print-database to display a list of the filetypes and what colour codes will be used for each one. [ …

Using wild-cards to display various files in a folder with ls. I recently needed to check whether certain files were in the /usr/lib folder and I used the ls command to do this. to find all files with the text mad in their file-name. [email protected] ~ $ ls /usr/lib/*mad* lrwxrwxrwx. 1 root root 15 18-12-11 …