How to list the 20 most recently modified files and other bash tricks.

This command will list 20 of the most recently modified files in a directory. jason@Yog-Sothoth:~/Documents$ ls -thor | head -n 20 total 3.9G -rwxrwxrwx 1 jason 219K Mar 20 2008 northwind.sql -rw——- 1 jason 2.2M Jan 21 2009 ubuntupocketguide-v1-1.pdf -rwxrwxrwx 1 jason 1.9K Apr 28 2011 randimg.c -rw-r–rw- 1 jason 18K Feb 16 2013 netinstall … Read more

Very useful Linux configurations for setting up a desktop.

IceWM configuration fileUseful Linux CommandsVery Verbose ps commandBlackbox ThemeGNU/Linux CD Burning: (Updated! for Debian Linux 6.0.)CD Burning with BraseroWriting Ghost Images to CD IceWM configuration file My ICEWM preferences file. from $HOME/.icewm/preferences. This file has a nice friendly time format and a good Win95 styled theme. This IceWM configuration file will give you a familiar … Read more

Miscellaneous Linux commands. Some useful tips for the Linux BASH prompt.

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 tux@linux-v415 ($ 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 tux@linux-v415 ($20:15:31 tux@linux-v415 ($ ldd ./a.out linux-vdso.so.1 => (0x00007fff171ff000) libc.so.6 => /lib64/libc.so.6 (0x00007fe56ef58000) … Read more

Nice commands on Macintosh to keep track of network usage.

The Mac OSX operating system has a lot of very useful commands for keeping track of network usage. Here is a very nice one. The nettop command. As you can see, this shows a constantly updating display of network usage on Mac. This is very useful for watching network throughput in real time. Especially, if … Read more

Interesting Linux commands that might be very useful.

List only directories with the Linux command line. This lists a directory with all folders listed first, then return only the listing of folders in the directory. 4.4 Tue Oct 09 jason@Yog-Sothoth 0: $ ls –color=auto –group-directories-first -Hul | head -n `echo */ | wc -w` total 3866624 drwxrwxrwx+ 6 jason jason 4096 Oct 9 … Read more

Finding the largest file in a directory and other cool Linux commands.

To find the largest file in a directory; use the du command and this will return the information you are after. Using the pipe symbol to send the text through to the head command will allow us to only return the one file we are interested in. jason@jason-desktop:~/Documents$ find . -type f -exec ls -al … Read more

Some more very useful Linux commands.

This Linux command will print all the filenames of the PAM libraries in the /lib directory. A good use of the find command. find /lib{,64} -iname ‘*pam*.so’find /lib{,64} -iname ‘*pam*.so’ Print a waveform in the terminal that will continue until you press control-c. for((i=0;;i++)) { printf "%$(bc -l <<< "a=20*s($i/10);scale=0;a/1+20")s|\n"; sleep .05; }for((i=0;;i++)) { printf … Read more

An alternative to the wget command for Linux. How to use curl to download files.

How the curl command works on Linux. A good alternative to wget. This shows how to use the curl command to download a file from the Internet. I am retrieving a file from a website which I may then view with my local machine. ubuntu ~ $ curl http://s2.enemy.org/globe.gif > out.gif % Total % Received … Read more

Historical Linux oddities from the past.

Interesting Linux oddities Linux has had quite a few odd programs and oddities released for it. One was a process management system that used a modified copy of Xdoom, a Doom source port, to manage processes. The utility used the Doom2 game files and there were Imps in the main outside courtyard. Shooting them and … Read more

Useful Linux commands for getting uptime and other information.

Very useful Linux commands Another way to get the uptime of the system. awk ‘{printf("Uptime: %d:%02d days, %02d minutes, %02d seconds.\n",($1/60/60/24),($1/60/60%24),($1/60%60),($1%60))}’ /proc/uptimeawk ‘{printf("Uptime: %d:%02d days, %02d minutes, %02d seconds.\n",($1/60/60/24),($1/60/60%24),($1/60%60),($1%60))}’ /proc/uptime Find the actual device name of the drive that contains your root partition. ip-172-31-20-16:~> findmnt -n -o SOURCE / /dev/xvda1ip-172-31-20-16:~> findmnt -n -o SOURCE / … Read more

Some very important Linux tips for new and advanced users.

IceWM configuration fileUseful Linux CommandsVery Verbose ps commandBlackbox ThemeGNU/Linux CD Burning: (Updated! for Debian Linux 6.0.)CD Burning with BraseroWriting Ghost Images to CDSome obscure Linux tips for the advanced Linux userDownload a new kernel for your Ubuntu Linux machine Some obscure Linux tips for the advanced Linux user The magic SysRQ key combination is used … Read more

Very useful VIM tutorial PDF.

This useful VIM tutorial PDF will teach you how to use the VIM editor on a UNIX or Linux system. http://www.securitronlinux.com/arma3/vim_revisited.pdf. This one has information about the VI editor. http://www.securitronlinux.com/arma3/why-why-vi.pdf. The above image contains the VI movement commands, allowing the user to move around the text file using the keyboard quickly. And this image is … Read more

How to create a dot matrix printer banner with Linux and other useful Linux tricks.

The printerbanner command will create a dot matrix printer banner. Just run the command and then type a string and hit ENTER. jason@debian:~$ printerbanner Message: Debianjason@debian:~$ printerbanner Message: Debian Print out the contents of a text file in octal format. jason@debian:~$ od .dmrc 0000000 042133 071545 072153 070157 005135 060514 063556 060565 0000020 062547 062475 … Read more

Random Linux commands.

Fetch information about a random Linux command. curl -sL commandlinefu.com/commands/random/plaintext | sed ‘3,4!d’curl -sL commandlinefu.com/commands/random/plaintext | sed ‘3,4!d’ Here is an example. ┌─[jason@neo]─[~] └──╼ $curl -sL commandlinefu.com/commands/random/plaintext | sed ‘3,4!d’ # An easter egg built into python to give you the Zen of Python echo "import this" | python┌─[jason@neo]─[~] └──╼ $curl -sL commandlinefu.com/commands/random/plaintext | sed … Read more

Some interesting and useful Linux commands and BASH tricks.

A useful awk implementation to count the number of entries in the /etc/passwd file. john@deusexmachina:~$ sudo awk -F: ‘{ print $1 }’ /etc/passwd | wc -l 34john@deusexmachina:~$ sudo awk -F: ‘{ print $1 }’ /etc/passwd | wc -l 34 And the quintessential “Hello World” in Awk. john@deusexmachina:~$ awk ‘BEGIN { printf "%s, %s\n", "Hello", "World!" … Read more