Show Disk Space Usage (Sorted)

Posted by: Jennifer Zelazny | 1 Comment

Every once and awhile I find myself needed to what is the space hog on my computer/server. While the command du – h in the command line works for a general overview – I really want to see the results in descending order (by space used). This command will list out everything in descending order so you can quickly see where the most space is used: du -k -s * | sort -k1 -g -r

Read More

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

Quick Site Backup (files and database) Via the Command Line

Posted by: Jennifer Zelazny | 0 Comments

If you do any sort of web development, it is more than likely that CPANEL and phpMyAdmin are good friends of yours…and you depend on them. Even though those are extremely handy to create/modify databases and create backups, it is extremely helpful to know how to do the same thing by using only SSH and command line utilities. To backup (export) a database using the command line interface (CLI): You will then need to provide your database password and the exported data will go into a file called “backup.sql” which is located in the directory that you are currently in…. Read More »

Read More

Mac OS X 10.5 (Leopard) SMB Fix

Posted by: Jennifer Zelazny | 2 Comments

I ran into an issue earlier today where I could not connect to a SMB share after my upgrade to Mac OS X 10.5. After some research, I found a thread in Apple’s Discussions. Basically…you need to not use “Connect to Server…” – you need to mount/unmount the SMB share via the command line. Basic Mount/Unmount Process Create a directory (folder) where you want the mounted share to appear. I created a folder called “SMB” on my Desktop Type in the following command: mount_smbfs //[email protected]/remote_share /Users/useyourusername/Desktop/SMB in the terminal You will be prompted for your password, type it in You… Read More »

Read More

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

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

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

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

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

fedora core 5 for PPC users is available.

Posted by: Jennifer Zelazny | 0 Comments

I have not had any recent how-tos or informational articles, but I am hoping to end that dry spell tomorrow after I install and configure Fedora 5. I have been very happy with Fedora 3 and 4, and look forward to the most recent release. Stay tuned. PS…yeah I know that other builds, besides PPC are also out, but they are not my concern at this point. [tags]Fedora Core 5[/tags]

Read More