Featured »

March 2, 2022 – 2:00 pm

Books have been written on the subject of awk and sed. Here’s a small sample of commands I put together over the years that are useful for everyday system administration tasks. Most of these tasks …

Read the full story »
Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Archive by Category

Articles in Files

Finding Duplicate Photos

February 15, 2022 – 1:57 pm
9dwz62kvm0gtjya9kwb7pawtk9y[1]

Being a shutterbug and a digital hoarder can get expensive. A couple of days ago, my
TerraMaster D5-300 5-bay DAS crashed. Again. This time it was the power supply. I replaced it only to discover that …

Focus Stacking with Lightroom and Photoshop

January 24, 2022 – 1:50 pm
zxulfg358ydpeyelfjppawbkxhr[1]

Not the usual topic for this blog and not the most comprehensive guide on the subject out there, but here I go anyway. Focus stacking combines multiple photos taken at different focal distances into an …

Generating Honeypot Data Structure

January 17, 2022 – 1:49 pm
on7avnij18ozm2jvppgdny2lhlv[1]

I’ve been fiddling with my inotifywatch scripts to make a better “early-warning” system for ransomware detection and realized I needed a more realistic honeypot data structure. Ransomware is getting more clever and is no longer …

Joining Text Files and Data Columns

December 18, 2021 – 12:17 pm
p65q1znipa66jngo3jjvbnmb7s7-scaled[1]

When working with application logs and other text files, it is often useful to view the contents of different source files side-by-side. Here we will take a quick look at various command-line methods for joining …

Generating Random Text Files for Testing

September 16, 2021 – 11:31 am
91ebozy1e3b138waujy28agrngy[1]

Sometimes you need dummy folder structures populated with random data for testing your various scripts and processes – backups, file transfers, encryption, compression, etc. Every time I need something like this, I end up writing …

Renaming Files with exiftool

September 2, 2021 – 11:25 am
b8g72yca7casi5shj7otypjbi20[1]

Recently I exported a whole bunch of files from Lightroom to a NAS share and filenames like 2E570434-67B7E0489CA2-39354-000017CF24DD8ACD.jpg are not very informative. It would’ve been nice if the filename contained some useful information like date, …

Appending Filenames

December 22, 2019 – 9:51 pm
gk5arsj5ijgmshcbh73vvpkdh2k[1]

If you google how to append, say, current timestamp to the filename in Bash, almost every suggestion boils down to something really basic along the lines of mv $somefile $somefile_$(date +’Y%-%m-%d’). Technically, this is correct …

Copying File Attributes Across Servers

November 29, 2019 – 9:40 pm
5wqsp02uml4to2k7pe8m63sd7q7[1]

To make long story short, had to fix someone’s chmod -R 777 /. A late-night copy-paste fail, it would seem. Needless to say, console access is required, as SSH will not work with permissions on …

Copying Data in a Restricted Environment

August 17, 2019 – 8:04 pm
o42ex2ebr1lhz7wxo84scrr9iuu

Consider this not-so-hypothetical scenario: you have some data on server_a that you would like to copy to server_b. Unfortunately, these two servers cannot communicate with each other. Nor do they have access to any common …

Squeezing Video Files

June 30, 2019 – 11:16 am
sqsb8tfjfhkyxgnmnq8dqzdbbdm

All that crap I’ve been saving from YouTube, Facebook and whatnot tends to add up. As quality is not a huge concern here (not that it was very high to begin with), optimizing those video …

File Compression Testing

January 27, 2019 – 5:29 pm
IMG_2308

For some reason I haven’t used zip much on Linux, sticking to the standard tar/gzip combo. But zip seems to be a viable alternative. While not as space-efficient, it is definitely faster; syntax is simple; …

Find Large Folders

January 9, 2019 – 4:37 pm
7ddwbuyj227hyhwysjt7kn7zm27

When you get a filesystem space alert (and they tend to arrive at 3:37 on Saturday morning), deleting various supersized log files is one option I already covered in adequate detail. That is if you get so lucky as to find such a file to delete…

Document Conversion with Unoconv

August 4, 2018 – 4:08 pm
ygtzk148sim2j4mgau6mkc2uur7

The other day I ran into the “Flexible Import/Export” article by Bruce Byfield in the March 2018 issue of Linux Pro Magazine and thought it could use some more detail. So here’s some more detail.

Find Large Files

February 17, 2018 – 3:21 pm
elephant

Every time a filesystem is running out of space and I need to find something to delete, I end up googling the syntax for the find command to make sure it stays off NFS and …

Agedu – Finding Old Files

November 7, 2016 – 3:35 pm
filing cabinet files

I almost never delete anything (not on purpose anyway). Having said that, sometimes I do need to find old data on a server and offload it to a NAS. Agedu has been around for ages. …

Deleting Lots of Files Quickly

November 17, 2015 – 9:03 am
machine-gun-001

I am not talking about hundreds or thousands of files. I am talking about hundreds of thousands. The usual “/bin/rm -rf *” may work, but will take a while. Or it may fail with the …

Numeric File Permissions in Unix

June 27, 2009 – 7:50 pm
shell_001

Suppose you are working with a Web server and your task is to make sure that no files or directories have permissions “777”. It would be easy to just recursively change permissions for all files …

Dealing With Disk Hogs

June 1, 2008 – 5:49 pm
hard_disk_drive_hdd_0005

Some users and application developers believe that any free disk space on the server belongs to them. Suddenly you get an email alert saying that a server “xyz” ran out of disk space in /home. …

Find largest files

November 19, 2005 – 11:17 pm
shell

How to find the largest files in the directory tree on Solaris.

To display file’s modification, last access, etc

November 19, 2005 – 11:14 pm
shell_0005

Display a file’s modification, last access and other attributes on Solaris.