Search

Top Posts

Comments

  • David: unfortunately this photo has either been doctored or is a complete fake. hopefully its the former 6 monitors...
  • slatapolsky: I should have updated this earlier, but I went ahead and upgraded from our old Netgear router (G) to a...
  • Cory: @Dave: It looks like 3rd party developers have access to this functionality, but not all use it. For example, I...
  • ZAYIFLAMA YOLLARI: Zayıflama Yolları, diyet listesi,rejim
  • Dan: You’d definitely need a microphone, mic stand and usb audio interface for a start!

Categories

Recent Posts


Command line usability basics: Pipes

Obviously we cover the Mac OS X command line relatively often here at OS X Daily, but our recent article Command Line usability basics: Redirection probably should have included a bit about pipes as well. Pipes allow you to direct the output of one command into the input of another, and knowing how and when to use them are vital to effective command line usage. Without further ado, here’s some information on command line pipes and how to use them:

The pipe symbol looks like |, (it’s the same key as your \ key, if you’re confused), and is immensely useful when you’re working in the command line. Here’s some examples:

ls -la | more
This takes the list command (with long and all flags) output and ‘pipes’ it through to the more command, allowing you to view the output one page at a time.

ps aux | grep user
This command takes the output of the process command, and reports back only process instances belonging to ‘user’

You can use pipe with virtually anything, so use your imagination.

Posted by: Editor

Share

Save big on Mac Deals from Amazon.com

Comments:

Comments: 1

Comment from kering
Time: January 14, 2008, 2:15 pm

usefull commands, thanks

Write a comment






April 3rd, 2007