New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

Pipe which to cd


Post Reply New Thread Subscribe

 
Thread Tools
HogsPogs

 
HogsPogs's Avatar
 
Member Since: Jul 23, 2009
Posts: 2
HogsPogs is on a distinguished road

HogsPogs is offline
I am trying to pipe the output from the which command to change directory with the following line of code

Code:
which ls | cd
I assumed this would change my current directory to where the ls command is located, i.e. /bin. I know in this case it is easier to type

Code:
cd /bin
but if the directory I want is 5 levels deep the piping method would be quicker. Thanks in advance.
QUOTE Thanks

Post Reply New Thread Subscribe


« Hidden Folders on my eReader HELP | I Salvaged Font Files Off A Mac HD, How Do I Restore Them To A New Mac? »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
'Broken Pipe' wireless printing issue solved Sulphur man Internet, Networking, and Wireless 4 02-05-2010 04:19 PM
Pipe Daemon shahvikram123 OS X - Operating System 8 06-02-2007 02:51 PM
Pipe key under Remote Desktop skiba OS X - Operating System 2 03-25-2007 09:59 AM

All times are GMT -4. The time now is 09:14 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?