Category: Mini How-Tos


How to Clear syslog Log Files in Linux

Many Linux distributions are preconfigured to automatically and periodically rotate syslog log files by means of cron jobs that call logrotate or a similar log rotation script. However, if you want to clear a log file manually, you can simply use the greater than sign followed by the log file name. For example, to manually clear the file kern.log, you can run this command:

me@mycomputer:> /var/log/kern.log

The beauty of this is that the cleared out file still retains its original permissions and ownership.

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

Page 6 of 9« First...«45678»...Last »