Category: Mini How-Tos


Displaying Masqueraded Connections

I often use Linux’s netstat command to do things like figuring out which ports are listening on a computer and what are the active connections on a computer. It’s very handy for troubleshooting networking problems.

Today I wanted to figure out what sites a certain user on my network was connecting to and how much traffic the user was using. I connected to the router with SSH and ran netstat with no options. I was surprised to see only my SSH connection. Then I remembered that the user in question gets onto the internet with a masqueraded address. Well, duh! Continue reading » Displaying Masqueraded Connections




How to Kill Outlook Before Backing Up Your PST file

I use Cobian Backup to automatically backup my Outlook mail file (i.e. PST file) as well as other types of files. There is a catch with backing up PST files with Cobian Backup — Outlook cannot be running. If Outlook is running, Cobian will not backup the PST file because it will be locked by Outlook.

Luckily, Cobian has a feature called “events”, which can be used to run arbitrary tasks before and/or after a backup job. I use this feature to kill Outlook before running my backup job, which removes the file lock and allows Cobian to backup the PST file.

If you want to use this feature to kill Outlook, the first step is to create a batch file that can kill Outlook from the command line. I called my batch file “kill_outlook.bat”. Here are the contents: Continue reading » How to Kill Outlook Before Backing Up Your PST file

Linux traceroute vs Windows tracert

Anyone who has used Linux traceroute and Windows tracert knows that the two programs have very different command line options. But did you know that there is a fundamental difference in the way that these two programs work? Continue reading » Linux traceroute vs Windows tracert

How to Sort Files By Modification Time in ls

To sort files by modification time when using ls, use the -t option. For example, to sort in descending order:

[me@mycomputer usr]$ ls -lt
total 224
drwxr-xr-x   88 root root 65536 Sep  1 17:39 lib
drwxr-xr-x   14 root root  4096 Sep  1 16:00 local
drwxr-xr-x    2 root root 12288 Jul 26 04:04 sbin
drwxr-xr-x  174 root root  4096 Jul 25 19:01 share
drwxr-xr-x    2 root root 40960 Jan 25  2006 bin
drwxr-xr-x    7 root root  4096 Jan 16  2006 libexec
drwxr-xr-x    3 root root  4096 Oct 16  2005 java
drwxr-xr-x   61 root root 12288 Mar 13  2005 include
drwxr-xr-x    4 root root  4096 Mar 13  2005 src
lrwxrwxrwx    1 root root    10 Mar 13  2005 tmp -> ../var/tmp
drwxr-xr-x    6 root root  4096 Feb 27  2005 kerberos
drwxr-xr-x    2 root root  4096 Feb 22  2005 etc
drwxr-xr-x    2 root root  4096 Feb 22  2005 games
drwxr-xr-x    7 root root  4096 Feb 21  2005 X11R6

To sort in descending order, add the -r option:

[me@mycomputer usr]$ ls -ltr
total 224
drwxr-xr-x    7 root root  4096 Feb 21  2005 X11R6
drwxr-xr-x    2 root root  4096 Feb 22  2005 games
drwxr-xr-x    2 root root  4096 Feb 22  2005 etc
drwxr-xr-x    6 root root  4096 Feb 27  2005 kerberos
lrwxrwxrwx    1 root root    10 Mar 13  2005 tmp -> ../var/tmp
drwxr-xr-x    4 root root  4096 Mar 13  2005 src
drwxr-xr-x   61 root root 12288 Mar 13  2005 include
drwxr-xr-x    3 root root  4096 Oct 16  2005 java
drwxr-xr-x    7 root root  4096 Jan 16  2006 libexec
drwxr-xr-x    2 root root 40960 Jan 25  2006 bin
drwxr-xr-x  174 root root  4096 Jul 25 19:01 share
drwxr-xr-x    2 root root 12288 Jul 26 04:04 sbin
drwxr-xr-x   14 root root  4096 Sep  1 16:00 local
drwxr-xr-x   88 root root 65536 Sep  1 17:39 lib
Page 9 of 11« First...«7891011»