Posts in the “linux-unix” category

Linux locate command man page

This page shows the contents of the Linux locate comamnd man page. This locate command output was created on a CentOS Linux system.

You can see this same locate command man page output by entering this command on your own Linux system:

Linux du command man page

This page shows the contents of the Linux du comamnd man page. This du command output was created on a CentOS Linux system.

You can see this same du command man page output by entering this command on your own Linux system:

Linux chmod command man page

This page shows the contents of the Linux chmod comamnd man page. This chmod command output was created on a CentOS Linux system.

You can see this same chmod command man page output by entering this command on your own Linux system:

Linux rm command man page

This page shows the contents of the Linux rm command man page. The rm command ("remove") is used for deleting files and directories on a Unix or Linux system.

This rm command output was created on a CentOS Linux system. You can see this same rm command man page output by entering this command on your own Linux system:

Linux mkdir command man page

This page shows the contents of the Linux mkdir command man page. This mkdir command output was created on a CentOS Linux system.

You can see this same mkdir command man page output by entering this command on your own Linux system:

Linux mv command man page

This page shows the contents of the Linux mv command man page. The Linux and Unix mv command is used to move and rename files and directories.

This mv command output was created on a CentOS Linux system. You can see this same mv command man page output by entering this command on your own Linux system:

Linux scp command man page

This page shows the contents of the Linux scp command man page. The scp command is used to perform a "secure" copy of one or more files between two Linux or Unix systems.

This scp command output was created on a CentOS Linux system. You can see this same scp command man page output by entering this command on your own Linux system:

Linux yum command man page

This page shows the contents of the Linux yum command man page. This yum command output was created on a CentOS Linux system.

You can see this same yum command man page output by entering this command on your own Linux system:

Linux cp command man page

This page shows the contents of the Linux cp comamnd man page. This cp command output was created on a CentOS Linux system.

You can see this same cp command man page output by entering this command on your own Linux system:

20+ vi and vim editor tutorials

I’ve written, edited, and re-organized a lot of vi/vim tutorials over the last few days, and to make it a little easier to find them all, I thought I’d link to them all from this “vi/vim tutorial collection” post.

To that end, here is a list of the vi and vim tutorials on my website, organized by category.

New release of the Teleport command

Quick note: I just released Version 0.3 of my Teleport command. If you haven't heard of it before, the Teleport command is the Linux/Unix cd command, with a memory. Because it has a memory, you can do many cool things, such as "teleport" from one directory to another, list the history of directories you've visited before, jump to directories with partial names, etc. I think it's pretty cool, and I hope you'll check it out. It's free, and released under the GNU GPL.

Linux shell script heredoc example

I was just working on my Linux Teleport command (Linux cd command with a history), and ran across the code below, which essentially shows how to use a form of "heredoc" syntax in a Bash shell script. This approach uses the Linux cat command, but functions just like the heredoc syntax in languages like Perl.

Here's the source code I just came across:

Nagios error code 127, make sure your plugin actually exists

Nagios FAQ: I'm trying to get Nagios to work, but when it starts running there is an error message in the log file that says something like "Nagios, Error Code 127, Make sure the plugin you're trying to run actually exists". How I can fix this?

sed swap command examples

Summary: This post shares some Unix/Linux sed command swap/replace examples, where you replace one string or regular expression with another string.

Here's the source code for a sed script that I used to convert some poorly formatted HTML into a format that I preferred. I ran this on a set of almost 30 JSP files from an open source project I recently worked on. The good news is that the previous format of the files was consistent, so I was able to use this sed script to convert all the files at once.

scp home directory - A shortcut to refer to your home directory

I learned a shortcut the other day about how to use the scp or pscp commands to securely copy files between computer systems using SSL. I used to always type an scp command like this to copy a file named myfile.tar from my local computer to my home directory on a remote system:

gvim fonts - How to set the default gvim font

Having just downloaded and installed vim (gvim) on my Mac (Mac OS X 10.5.x to be precise), and then struggling for a while to set the default font, I thought I'd make a brief note here about how to set the default font properly.

Setting a default gvim font in the gvimrc file

To set a default font for the gvim editor (in my case on Mac OS X), edit a file named ~/.gvimrc (i.e., a file named .gvimrc in your home directory), and add this line to get a 12-point Monaco font:

How to install Apache with the mod_proxy module

Over the weekend I was trying to configure Apache as a reverse-proxy server (specifically as a reverse-proxy server working in conjunction with OpenSSO), and I couldn't get it to work at all. It's been a while since I last installed Apache, and I assumed it was configured with the modproxy module by default, but it turns out that it's not: You have to configure Apache with the mod_proxy module at installation time in order for things like the ProxyPass configuration to work.

Linux df command man page

This page shows the contents of the Linux df comamnd man page. This df command output was created on a CentOS Linux system.

You can see this same df command man page output by entering this command on your own Linux system:

How do I show Linux disk space information?

Linux FAQ: How do I show Linux disk space information? (Also stated as, "What is the Linux disk space command?")

Answer: You show Linux disk space information with the Linux df command. I have a more detailed Linux df command example, but in short, I typically use the Linux df command like this, with the -h option:

df -h

The -h option stands for "human readable", and I almost always use that option instead of using the df command by itself.