Comparing two files
There is the well-known diff command, but besides this there are at least two more ways to compare the contents of files. First, here are three sample files to compare to: # cat test1 1 2 3 4 5 6 # cat...
View ArticleSticky revealed – difference between rws and rwS
This will be a short one. I just wanted to make myself a short reminder about Unix permissions. The theory about SUID/SGID/Sticky bits are already clear. But there is a slight difference between SUID...
View ArticleSamba locations
I’m always in trouble if I need some files for samba. CIFS is rarely used, and if I need to configure something regarding Windows-compatible shares then I don’t know where to find these files. This...
View ArticleAdvanced scripting – changing the UID of a user
At one of our customer we will have an monstre’ UID-consolidation projekt in the near future. For this purpose I’ve written a script to enlighten our task. Most of you thinks at it a an...
View ArticleVXFS maximum subdirectory limit
It is not commonly known that VXFS has a “maximum subdirectory limit”, but you may come across this if e.g. you are administering a large archive server. The limit is at 32766, and the only thing you...
View ArticleSparse files and how to create them
First of all, let’s clear the definition of the “sparse file”. It is – as the name suggest – a file with “holes” in it. If a file anyhow doesn’t contain any data at some places, the system won’t...
View ArticleMigrating data
Here’s another one-liner which helps to migrate data from one filesystem to another in one turn: # ( cd /mnt/src/ && tar c . ) | ( cd /mnt/dst/ && tar xv . )
View ArticleWorking with configuration files
Not many people knows about the HP-UX tool ch_rc. This is a command line tool for people who are not so familiar with sed (stream editor), awk and pattern matching. SYNOPSIS /usr/sbin/ch_rc -a|-r|-l...
View Article