useful Terminal commands - ehMac.ca
Facebook
Twitter
YouTube
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
Old Mar 24th, 2004, 03:56 PM   #1
Full Citizen
 
zigzagry's Avatar
 
Join Date: Apr 2003
Location: Brampton
Posts: 554
Send a message via ICQ to zigzagry Send a message via MSN to zigzagry
Talking

in light of my recent post in the troubleshooting forum I was thinking this might be a good idea.

I'd love to see a long string of 'must know' terminal commands on here. I'm still very new to the concept but have learned quite a bit by digging around other sites and now I don't know how I lived without osx.

I know there are many people here who have a wealth of knowledge regarding Terminal use.

Share it please.
__________________
Dolomite, the tough black mineral that won't cop out when there's heat all about.
zigzagry is offline   Reply With Quote
Sponsored Links
Advertisement
 
Old Mar 24th, 2004, 06:12 PM   #2
Full Citizen
 
zigzagry's Avatar
 
Join Date: Apr 2003
Location: Brampton
Posts: 554
Send a message via ICQ to zigzagry Send a message via MSN to zigzagry
Post

allow me to be the first

disktool -e disk1 (cd drive)
disktool -e disk2 (zip drive)

this is the command to eject your disks.
__________________
Dolomite, the tough black mineral that won't cop out when there's heat all about.
zigzagry is offline   Reply With Quote
Old Mar 24th, 2004, 07:20 PM   #3
Full Citizen
 
sinjin's Avatar
 
Join Date: Jul 2003
Location: New Zealand
Posts: 523
Send a message via AIM to sinjin
Post

After a crash (or for good measure); upon start-up hold down "apple + s" until your monitor begins filling with text. After the text finishes spilling out type
</font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">/sbin/fsck -y</pre>[/QUOTE]Repeat until no errors are reported, then type
</font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">exit</pre>[/QUOTE]to return to normal booting. You've now repaired your filesystem.
__________________
How could you not be happy with balloons full of hamsters hanging off of your belt?
sinjin is offline   Reply With Quote
Old Mar 24th, 2004, 08:33 PM   #4
Public Servant
 
Chealion's Avatar
 
Join Date: Jan 2001
Location: Calgary
Posts: 7,069
Send a message via ICQ to Chealion Send a message via AIM to Chealion Send a message via MSN to Chealion
Post

sinjin - This only works on non-journalled drives, but if you change the command to fsck -fy it will check it anyway.

Other fun terminal command thread found previously on ehMac:
Terminal Commands

You can also try out (use man pages to find out more; in Terminal type in man command) :
cal -> Shows a calendar.
banner -> Make a banner.
smbclient -M destination -U username -> Send Messenger/WinPopUp messages to Windows computers on your network. Destination is the computer name, and Username is your name (or whatever you want, eg. God.)
__________________
I still remember Macnutt.
Chealion is offline   Reply With Quote
Old Mar 24th, 2004, 08:52 PM   #5
kps
Tritium Glow
 
kps's Avatar
 
Join Date: May 2003
Location: GTA & Beyond
Posts: 6,783
Post

It's not always that the CD or DVD drive will be disk1, on my machine it's disk2 because I have a second internal drive...so before tearassing around the terminal unmounting disks and partitions one should run the df command and find out for sure.

Output of df [no option flags]

</font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Filesystem 512-blocks Used Avail Capacity Mounted on
/dev/disk1s9 52424656 22064576 29848080 43% /
devfs 205 205 0 100% /dev
fdesc 2 2 0 100% /dev
&lt;volfs&gt; 1024 1024 0 100% /.vol
/dev/disk0s9 20969696 8033216 12936480 38% /Volumes/Darcy
/dev/disk0s10 57186800 13422344 43764456 23% /Volumes/Trish
/dev/disk1s10 6290856 613624 5677232 10% /Volumes/OS9
/dev/disk1s11 2096880 32872 2064008 2% /Volumes/swap
/dev/disk1s12 59279088 50587584 8691504 85% /Volumes/masterX
automount -nsl [314] 0 0 0 100% /Network
automount -fstab [322] 0 0 0 100% /automount/Servers
automount -static [322] 0 0 0 100% /automount/static
/dev/disk2s0 926348 926348 0 100% /Volumes/PCD3637</pre>[/QUOTE]In my case, the DVD drive is disk2s0, so the command would be:

disktool -e disk2s0

and there's always more than one way to "skin a cat" in unix...

diskutil eject disk2s0
__________________
••••••••••••••••••••••••••••••••••••••••••••••••
Please help fight Cancer -Donate or volunteer to the Canadian Cancer Society
---------------
MOΛΩN ΛABE
kps is offline   Reply With Quote
Old Mar 25th, 2004, 04:56 AM   #6
Full Citizen
 
Join Date: Jun 2003
Location: Saudi Arabia
Posts: 189
Post

A good place to start for anyone wanting to brush up on unix terminal commands and the basics of how to, check out the following:

www.macinstruct.com/tutorials/unix/index.html

You can also find part 1, 2, and 3 on the october, november and december 2001 macaddict disk's. These will only run in classic though.

Enjoy!
mac java is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
need an SSH Terminal app dmpP Anything Mac 8 Jun 15th, 2005 07:32 PM
Terminal help needed pismo923 Mac, iPhone, iPad and iPod Help & Troubleshooting 13 Apr 19th, 2005 12:57 AM
Mac Os Terminal Server? Jason H Anything Mac 0 Jun 28th, 2004 06:43 PM
Terminal Commands csonni Anything Mac 9 Dec 29th, 2003 08:02 PM
help in running Terminal commands csonni Mac, iPhone, iPad and iPod Help & Troubleshooting 6 Feb 18th, 2003 10:59 PM


All times are GMT -4. The time now is 03:58 AM.



Copyright © 1999 - 2012, ehMac.ca All rights reserved. ehMac is not affiliated with Apple Inc. Mac, iPod, iTunes, iPhone, Apple TV are trademarks of Apple Inc. Content Relevant URLs by vBSEO 3.6.0 RC 2

Tribe.ca: Urban living in Toronto!