Jennifer Zelazny

Random and Opinionated Thoughts

Tag: UNIX

Apple UNIX

Copy to Clipboard in the Command Line Interface (CLI)

Posted by: Jennifer Zelazny | 0 Comments

Ever wonder how to copy something from the command line into the Mac OS clipboard? If you want to copy/paste a files content (perhaps a log file or a conf file, etc) into the clipboard to use outside of the CLI, you can use the commands pbcopy and pbpaste. Example: I want to copy the contents of my public key to the clipboard (so I can send it to a server admin who will use it in allowing me to access their subversion repository). All I would need to do is: cat id_dsa.pub | pbcopy (cat writes out the content... Read More » Read more

Hints HOWTOs UNIX

Nano Tip

Posted by: Jennifer Zelazny | 1 Comment

I have been doing a lot of work recently on a remote server and have needed to use a text editor – so I decided to use the ever-so-easy nano. Problem is – the files I am working on are very long and editing them is not fun. I finally decided to look through the man pages (I am an emacs person myself) and found something that ended up saving me tons of time…”go to line number”. If you are editing a file and know you need to edit something on line 1245, you would type in: and it would... Read More » Read more

Hints HOWTOs UNIX

whereis and locate.

Posted by: Jennifer Zelazny | 0 Comments

A few simple commands to help make your life working with UNIX a little easier: If you are looking for a certain programs, use:whereis. Example. You want to find out where ipfw is located. In the command line type whereis ipfw and whereis will spit out the location (/sbin/ipfw). If you need to find a program or a file and you know what it is called, use:locate. Example. I know I want to uninstall MySQL, and I want to see every file that has mysql in the file path. In the command line, type locate MySQL and locate will spit... Read More » Read more

General Hints HOWTOs UNIX

print file size command.

Posted by: Jennifer Zelazny | 0 Comments

Earlier today I was asked for the command to show a file size in UNIX and so I thought I would share. There are, of course, a few ways to do this. One great little command to keep handy is:du -h. The du (display utility) will print out the size of a file or directory. The -h will make it “human readable” (put the sizes in Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte). So, next time you need file or directory sizes, use du -h and be done with it! Read more

Content Management Systems General UNIX

command line to the rescue…again.

Posted by: Jennifer Zelazny | 0 Comments

While upgrading a client’s web site to XOOPS 2.0.14 I ran into some issues with the XOOPS 2.0.14 package file (a tar.gz file). Stuffit Expander would only extract a few folders, then report an error and quit. After a few attempts, and all failures, I had to chose to turn to the command line and bingo, no problems! So, if you ever have any issues with Stuffit Expander and need to uncompress a .tar.gz file, the following commands will come in handy: To uncompress a gz file: gunzip file.gz To uncompress a tar file: tar [tar options (usually xvf)] file.tar... Read More » Read more

General UNIX

ubuntu 5.10 for PPC.

Posted by: Jennifer Zelazny | 2 Comments

Well, after some problems downloading the 3.3GB image of Fedora Core 5 and then my PowerBook not recognizing the DVD media (no, I was not about to re-download all five install CD images and burn them to CD…this is not 1993 again with installer floppies everywhere…and I did not have any other DVD media on hand), I decided to try a different flavor of Linux: Ubuntu. A few people that I I have been talking to recently either prefer Ubuntu, or have recently tried it, like Tim. Since the install image is only 644.5MB, I decided it might be the... Read More » Read more

General Hints HOWTOs UNIX

print out certain line numbers with sed.

Posted by: Jennifer Zelazny | 0 Comments

It has been a year now since I completed my UNIX/Linux certification training and every once and awhile I think about my friend Perl, but I really enjoy helping others with some simple needs. Ben (yeah, I got him using WordPress too ;)) aked me a great recently: Question: If i have a huge log text fie and i want to pull a range of lines out of the middle, how can I easily do this? Answer: sed -n '3,6 p' /var/log/httpd/error_log Answer broken down: sed is the UNIX tool I chose for this. -n is used so that sed... Read More » Read more

General UNIX

Nagios Updated

Posted by: Jennifer Zelazny | 0 Comments

Hi. I spent my exciting day with my old friend Nagios. Due to a few issues, I had to move my Nagios install to a new server, and while I had the time to move it, I also decided it was time to tweak it some. I wanted to point out that Nagios was updated to version 1.3 (change log). No major changes, but enough to upgrade. Missed my Nagios articles? Why Nagios? Installing Nagios Configuring Nagios Customizing Nagios Ps, the upgrade was a piece of cake. No issues (for once). [tags]Nagios[/tags] Read more

General HOWTOs UNIX

System Monitoring with Nagios – Part 4 of 4

Posted by: Jennifer Zelazny | 0 Comments

I have decided to write a four part article on the benefits of using Nagios. The first article focused on why I chose Nagios/what it offers. The second article focused on installing Nagios on Mac OS X. The third article focused on configuring Nagios. This fourth article will focus on improving the Nagios interface and further customizing it. Customizing Nagios…the fun continues. Run Nagios at Boot with an Init Script: There is a great article on how to create a StartUpItem for Mac OS X. Scroll all the way to the bottom and follow the instructions. Adding Icons: If you... Read More » Read more

HOWTOs UNIX

System Monitoring with Nagios – Part 3 of 4

Posted by: Jennifer Zelazny | 4 Comments

I have decided to write a four part article on the benefits of using Nagios. The first article focused on why I chose Nagios/what it offers. The second article focused on installing Nagios on Mac OS X. This third article will focuses on configuring Nagios. The fourth article will focus on improving the Nagios interface and further customizing it. Configuring Nagios…let the fun begin! With version 1.2 of Nagios, there are multiple files by default located in /usr/local/nagios/etc/: cgi.cfg This file is used to define the settings for the nagios’ CGIs. All of your basic CGI paths, authentication, commands are... Read More » Read more