Check NSR Legato Networker Backups

Problem You want to view the back ups performed via Legato Networker NSR. Solution Use mminfo – media manager for NSR. It can show which filesystems...

RISC System 6000 Boot LEDs

Problem Your RS6000 ain’t booting. ๐Ÿ™‚ Or you are just interested what the LEDs mean. Solution See Example Example Power On [LED 100 – 199]BIST...

Clearing an AIX Print Queue

Problem You have jobs stuck in the print queue. You want to clear the queues and remove all jobs. Solution You have to stop all processes and remove the...

DNS, Sendmail and Building Linux

Problem Have been aware of DNS and sendmail for over 10 years, but never really dabbled. Solution Hit a lot of issues, mainly with dodgy clients –...

Ping host measured in microseconds

Problem You want to ping a host on a given port and record time taken in microseconds.The following solution uses PHP socket libraries to open a connection,...

AIX ODM removing device

Problem Someone removes a tty, printer, etc by doing rm /dev/lp3.Then you cannot recreate the device, as system returns “already defined at that...

who command 5 ways

Problem You want to know who is on the system. Or which userid you are using.What runlevel you are at – or when the system was booted.All doable...

List files 12 ways

Problem You want to list files under UNIX! ๐Ÿ™‚ Here I show 12 different ways to do it. Solution See the example and reference tabs. Example 1. Basic[[email protected]

Permissions extension setfacl

Problem You want to allow access to files or directories, without giving exclusive use of a given group, user, etc. Solution Use setfacl. ๐Ÿ™‚ See the...

Linux dircmp – directory compare

Problem I wanted to run a dircmp with the -d option, to show all files that are different.Plus display those differences.Linux replied – command...

Redundant key strokes

Problem Carrying on with my lazy steps, there are bits of code used with UNIX commands, which are completely redundant. Solution Save yourself some key...

Restarting Linux services boot time

Problem Every time you reboot your Linux Box – web server, samba server, etc is down. Solution Use chkconfig. See the example tab and then reference...

Lazy tip – wrong password

Problem You start typing your password in UNIX, then realize – hold on that ain’t right.Sometimes your control c it – other times just...

YUM fails with 404

Problem If you (like me) was well keen, to get your shiny new fedora core 5 system up and running. Then you run yum and think, hang on that ain’t...

Linux iptables blocking IP address

Problem You do a netstat -an and see a raft of connections to your apache host, coming in at 10 – 20 a second.It shows ::ffff:10.0.0.10:80 ::ffff:212.248.1.1:1403...

UNIX Lesson Six

Problem You want to write elegant code, which integrates well (pipes) with other UNIX commands. Solution Learn these UNIX Laws, from the inventor of UNIX...

UNIX Lesson Five

Problem Coding in UNIX is an art form, where certain philosophies prevail. Solution To really excel at UNIX coding and produce elegant, efficient, low...

UNIX Lesson One

Problem You are a complete beginner and keen to learn UNIX! Solution Okay in the examples, I am going to start very basically.From the outset, you need...

File handling – UNIX stat

Problem You want to view seconds since last change or use Perl to process a number of files.Or maybe you just want a programmatic way to deal with file...

Check specific number arguments

Problem You want to check a specific number of arguments, have been supplied to your Perl script. Solution This snippet at the example tab, demonstrates...

Debugging Perl

Problem You have an error in your Perl script and want to debug it. Solution Debugging in Perl is very extensive, this demo is very basic! ๐Ÿ™‚ Check the...

Perl in file pattern substitution

Problem You want to substitute a pattern in a number of files, making backups and modifying in place on the fly.And you can do this in Perl – with...

Date handling in Perl

Problem You want to convert epoch into readable date and time.Maybe you have a log file, which is pumping out lines prefixed with the epoch? Solution We...

Column handling in Perl

Problem During my first encounters with Perl many years ago, I asked how can I get a specific column.It was so easy in AWK! ๐Ÿ˜‰ Solution Well here it...

Listen on port – client server demo

Problem You want to listen on a port, maybe to test firewalls! ๐Ÿ™‚Excellent introduction to client server software. Solution Another use bit of socket...

LDAP LDIF Perl search script

Problem You want to search an LDIF file for a given dn, or pattern. Solution Multi-line pattern search and output – useful for LDIFs! ๐Ÿ˜‰Written...

Modify LDAP records with JNDI

Problem Need to modify an LDAP record with JNDI, the Java Naming Directory Interface.Following on from using java to perform LDAP searches, here is a quick...

scan network port with perl

Problem You want to test a network port, on a remote system – over TCP/IP.Maybe this is a new setup, or you want confirmation it is working.Perhaps...

Obtain epoch time and calculate date yesterday

Problem You want to capture the current epoch. Maybe to use in a log file, or as a filename.Or maybe you want to calculate the date yesterday. Solution...

Calculate largest field big data file

Problem I wanted to upload a delimited field to mysql db, but hit the problem that the file contained nearly 3000 rows and no schema on the required size...