Category Archives: sysadmin

PHPHOST BLOG

Web Hosting Related Articles You May Need

[one-liner]: Using the Linux Command, dirsplit, to Dynamically Backup a Directory Over Multiple DVDs

Background

At my day job I deal with a fair amount of image data. We typically are shipping the data out on either hard drives, thumb drives, or via SFTP. On occasion we will some times burn it to a CD and/or a DVD. But until today all the data was either large sets (200-400GB) variety, […] Continue reading

Posted in backup, centos, DVD, fedora, iso, one-liner, redhat, rhel, script, Syndicated, sysadmin, tips & tricks | Comments Off on [one-liner]: Using the Linux Command, dirsplit, to Dynamically Backup a Directory Over Multiple DVDs

[one-liner]: Using the Command lsb_release to Determine Linux Distro Version Info

Background

If you need to determine which version of Linux you’re using you can use the command lsb_release. It’s part of the Linux Standards Base which is a specification that was created by the Linux Foundation.

Solution

Obviously there are other ways to do this, for example, on a Redhat based system you can look for the file […] Continue reading

Posted in linux, LSB, one-liner, Syndicated, sysadmin, tips & tricks | Comments Off on [one-liner]: Using the Command lsb_release to Determine Linux Distro Version Info

How to Analyze Network Performance using iperf on Fedora, CentOS & Windows

I’ve been experiencing some slow network connections between a couple of Linux systems (CentOS), Window systems (Server 2008R2), and a NAS device (Netgear ReadyNAS) and wanted to confirm that my network connections weren’t the source of the problem. To limit any variability due to different tools, I decided to use iperf, which can run on […] Continue reading

Posted in centos, fedora, linux, networking, performance, redhat, rhel, Syndicated, sysadmin, tips & tricks, windows | Comments Off on How to Analyze Network Performance using iperf on Fedora, CentOS & Windows

[one-liner]: Redirecting an Already Running Program’s STDOUT to a File using dupx

Background

Recently I came across this really cool UNIX tool called dupx. I was looking for a way to connect to a program’s STDOUT and STDERR after I had already started it. This was a long running, think 30+ hours job, and I didn’t want to have to stop and restart it. As is the case […] Continue reading

Posted in centos, fedora, linux, one-liner, rhel, shell, Syndicated, sysadmin, tips & tricks | Comments Off on [one-liner]: Redirecting an Already Running Program’s STDOUT to a File using dupx

[one-liner]: Archving a Directory Tree into a CD or DVD via the Command Line Using mkisofs on Fedora 14 & CentOS 5

Background

Recently I was putting together a script to build an archive of all the various files that a project was comprised from. One of the final tasks was to burn the entire lot of files to a CD or DVD, so I took the opportunity to figure out how to do this from the command […] Continue reading

Posted in cd, centos, DVD, fedora, one-liner, redhat, rhel, Syndicated, sysadmin, tips & tricks | Comments Off on [one-liner]: Archving a Directory Tree into a CD or DVD via the Command Line Using mkisofs on Fedora 14 & CentOS 5

[one-liner]: Why is awk skipping the first line?

Background

I’ve used AWK for years but never had a reason to use it to split on anything except spaces until now. Hard to believe but I usually use sed to convert the separator characters to spaces.

1
2
# sed example
echo "this|is|a|string" | sed ‘s/|/ /g’

So I was trying to use AWK’s field separator variable, FS but […] Continue reading

Posted in awk, one-liner, shell, Syndicated, sysadmin, tips & tricks | Comments Off on [one-liner]: Why is awk skipping the first line?

[one-liner]: Command-line Fu … Useful Linux Commands (repost)

Background

Came across these commands on another blog and wanted to create my own personal copy of these useful command-line examples.

Commands

1
2
3
4
% sshfs name@server:/path/to/folder /path/to/mount/point
# Mount folder/filesystem through SSH
# Install SSHFS from http://fuse.sourceforge.net/sshfs.html
# Will allow you to mount a folder security over a network.

1
2
3
4
5
% !!:gs/foo/bar
# Runs previous command replacing foo by bar every time that foo appears
# […] Continue reading

Posted in linux, one-liner, shell, Syndicated, sysadmin, tip, tips & tricks | Comments Off on [one-liner]: Command-line Fu … Useful Linux Commands (repost)

[one-liner]: How to Change the Hostname on a Fedora/CentOS/RHEL System

Background

Changing your system’s hostname is probably one of the most confusing things to do on a Redhat based Linux system. Turns out there are several ways to do it, part of the reason why it’s so confusing … I guess. Here’s my attempt to capture as many of them that I’m aware of.

Solution

There are essentially […] Continue reading

Posted in centos, fedora, linux, one-liner, redhat, rhel, Syndicated, sysadmin, tips & tricks | Comments Off on [one-liner]: How to Change the Hostname on a Fedora/CentOS/RHEL System

[one-liner]: Managing RPM Repo GPG keys on a RPM base Distro (Fedora/CentOS/RHEL)

Background

Occasionally you might need to remove an RPM GPG signing key from your system. These are the keys that typically get installed using a command similar to this:

1
rpm –import http://packages.atrpms.net/RPM-GPG-KEY.atrpms

Turns out they’re pretty easy to remove….

Solution

The key is to understand that most of the same commands that you’d use to query your RPM database apply […] Continue reading

Posted in centos, fedora, linux, one-liner, package management, redhat, rhel, rpm, Syndicated, sysadmin, tips & tricks | Comments Off on [one-liner]: Managing RPM Repo GPG keys on a RPM base Distro (Fedora/CentOS/RHEL)

[one-liner]: Can’t Connect to VMware Server 2.x from Internet Explorer 8

Background

Recently I ran into a problem where I wasn’t able to connect to a VMware Server from IE 8. I was getting an error message that didn’t give me much to go on. Basically IE displayed a blank page and there was a little yellow exclamation point in the lower left corner of IE.

<p […] Continue reading

Posted in one-liner, Syndicated, sysadmin, tip, tips & tricks, vmware | Comments Off on [one-liner]: Can’t Connect to VMware Server 2.x from Internet Explorer 8