Posts Tagged ‘cli’
Power up your Command Line Fu!
Written by sean on September 8, 2008 – 10:07 am -
IBM developerworks has a ton of useful information. I recently came across two great and related articles that might be of interest to readers of this blog. These two articles describe the steps to take you out of the basic command line functionality into power user territory.
The first article “Learn 10 Good Unix Usage Habits“:
- Make directory trees in a single swipe.
- Change the path; do not move the archive.
- Combine your commands with control operators.
- Quote variables with caution.
- Use escape sequences to manage long input.
- Group your commands together in a list.
- Use xargs outside of find .
- Know when grep should do the counting — and when it should step aside.
- Match certain fields in output, not just lines.
- Stop piping cats.
The other article expands on it “Learn 10 More Good Unix Usage Habits” :
- Use file name completion.
- Use history expansion.
- Reuse previous arguments.
- Manage directory navigation with pushd and popd.
- Find large files.
- Create temporary files without an editor.
- Use the curl command-line utility.
- Make the most of regular expressions.
- Determine the current user.
- Process data with awk.
Tags: cli
Posted in SysAdmin | No Comments »
Command Line Quickies - ps
Written by sean on August 4, 2008 – 7:55 am -ps shows running processes on your system. It has many options to show different information, but I usually find running ps -aef the most useful. Bonus CLI-fu: pipe it to grep and search the process list

Tags: cli, ps
Posted in Command Line Quickies | No Comments »
Command Line Quickies - force disk check on next reboot
Written by sean on July 29, 2008 – 6:30 am -Ubuntu will occasionally run a filesystem check every 30th (or so) bootup. Usually that happens when I am working on something, and don’t want to wait. But I also like to make sure my disk is error free, so I will occasionally run it manually. The gotcha here is you should NEVER run fsck on a mounted file system. But a simple command can cause a fsck run on the next reboot:

when the machine restarts, it will run fsck.
Tags: cli, fsck
Posted in Command Line Quickies | No Comments »
Command Line Quickies - df
Written by sean on July 23, 2008 – 6:30 am -df shows you the free hard disk space on your system. df -h will show the information in a more readable format (ie MB or GB instead of blocks).

Tags: cli, df
Posted in Command Line Quickies | No Comments »
Command Line Quickies - zgrep
Written by sean on July 15, 2008 – 7:30 am -[Ed Note] Welcome to Command Line Quickies. These recurring shorts will introduce some command line tips that you may not know of but can be useful. As with any tool, this is only the most basic overview of the functionality of the command covered. More information can be found by typing “man commandname” at the command line. [/Ed Note]
zgrep works just like grep, but for compressed files. This great utility will search zipped files for a string of text without you having to decompress it first.

Tags: cli, zgrep
Posted in Command Line Quickies | No Comments »
