Jump to content

[INFO] Various Unix/Mac OS X terminal commands


  • Please log in to reply
82 replies to this topic

#21
Korrupted

Korrupted

    Wandering Samurai

  • Retired
  • 1,623 posts
  • Location:Wandering the world over.
  • Interests:Mac<br />Laptops
Added how to make your own Terminal Commands.

#22
monkeysr

monkeysr

    InsanelyMac Protégé

  • Members
  • Pip
  • 31 posts
Replacing: <string>-v</string>

with:

<string>"Graphics Mode"="1280x960x32@85"</string>

Killed my OSX installation. It will no longer boot.

#23
Korrupted

Korrupted

    Wandering Samurai

  • Retired
  • 1,623 posts
  • Location:Wandering the world over.
  • Interests:Mac<br />Laptops
Then boot in -s to remove it :hysterical:. I also fixed it to what it should really be.

#24
monkeysr

monkeysr

    InsanelyMac Protégé

  • Members
  • Pip
  • 31 posts
Thanks! :hysterical:

#25
Korrupted

Korrupted

    Wandering Samurai

  • Retired
  • 1,623 posts
  • Location:Wandering the world over.
  • Interests:Mac<br />Laptops

Thanks! :hysterical:


Did the new fix work for you?

#26
youraa

youraa

    InsanelyMac Protégé

  • Members
  • Pip
  • 24 posts
hi i 've been trying to change my resolution acording to your instructions and cannot menage could you pls help, i'm adding messages from my terminal

-bash: bluntman: command not found
zdzislaws-computer:~ zdzislaw$ <key>Graphics Mode</key>
-bash: syntax error near unexpected token `newline'
zdzislaws-computer:~ zdzislaw$ <key>Graphics Mode</key></string>1280x1024x32@60</string>
-bash: syntax error near unexpected token `<'
zdzislaws-computer:~ zdzislaw$ <string> "Graphics Mode"="1280x1024x32@60" </string>
-bash: syntax error near unexpected token `newline'
zdzislaws-computer:~ zdzislaw$ <key>Graphics Mode</key> </string>1280x1024x32@60</string>
-bash: syntax error near unexpected token `<'
zdzislaws-computer:~ zdzislaw$ <string>"Graphics Mode"="1280x1024x32@60"</string>
-bash: syntax error near unexpected token `newline'
zdzislaws-computer:~ zdzislaw$ <string>"Graphics Mode"="1280x1024x32@60"</string>
-bash: syntax error near unexpected token `newline'
zdzislaws-computer:~ zdzislaw$ <key>Graphics Mode</key> </string>1024x768x32@60</string>
-bash: syntax error near unexpected token `<'
zdzislaws-computer:~ zdzislaw$ <string> "Graphics Mode"="1280x1024x32@60" </string>
-bash: syntax error near unexpected token `newline'
zdzislaws-computer:~ zdzislaw$ <string> "Graphics Mode"="1280x1024x32@60" </string>
-bash: syntax error near unexpected token `newline'
zdzislaws-computer:~ zdzislaw$

pls help I'm new in these matters :graduated:

#27
youraa

youraa

    InsanelyMac Protégé

  • Members
  • Pip
  • 24 posts

hi i 've been trying to change my resolution acording to your instructions and cannot menage :( could you pls help, i'm adding messages from my terminal

-bash: bluntman: command not found
zdzislaws-computer:~ zdzislaw$ <key>Graphics Mode</key>
-bash: syntax error near unexpected token `newline'
zdzislaws-computer:~ zdzislaw$ <key>Graphics Mode</key></string>1280x1024x32@60</string>
-bash: syntax error near unexpected token `<'
zdzislaws-computer:~ zdzislaw$ <string> "Graphics Mode"="1280x1024x32@60" </string>
-bash: syntax error near unexpected token `newline'
zdzislaws-computer:~ zdzislaw$ <key>Graphics Mode</key> </string>1280x1024x32@60</string>
-bash: syntax error near unexpected token `<'
zdzislaws-computer:~ zdzislaw$ <string>"Graphics Mode"="1280x1024x32@60"</string>
-bash: syntax error near unexpected token `newline'
zdzislaws-computer:~ zdzislaw$ <string>"Graphics Mode"="1280x1024x32@60"</string>
-bash: syntax error near unexpected token `newline'
zdzislaws-computer:~ zdzislaw$ <key>Graphics Mode</key> </string>1024x768x32@60</string>
-bash: syntax error near unexpected token `<'
zdzislaws-computer:~ zdzislaw$ <string> "Graphics Mode"="1280x1024x32@60" </string>
-bash: syntax error near unexpected token `newline'
zdzislaws-computer:~ zdzislaw$ <string> "Graphics Mode"="1280x1024x32@60" </string>
-bash: syntax error near unexpected token `newline'
zdzislaws-computer:~ zdzislaw$


You have to add that to your com.apple.boot.plist




Thx for the help:)
But must haxe mixed something up my system is not booting anymore :(
I have the grey screen a nd the dashed circle rotating and nothing happens,
i read about similar pronlem of one of the guys but coludn't find the solution:(
In the file it looked like that:

<key>Graphics Mode</key>
<string>"Graphics Mode"="1280x1024x32@60"</string>


I replaced the <string></string> (I think) which was underneath the line <key>Graphics Mode</key> with <string>"Graphics Mode"="1280x1024x32@60"</string>

then I couldn't save :( Now i know that I should use ctrl O)
so i copied the file to the desktop made the changes and overwrote the old file in the preferences folder

ehmm does it mean I need to format :(?
How do i start in yhe -s mode?
thx for the help

#28
panos

panos

    InsanelyMac Protégé

  • Members
  • Pip
  • 15 posts
Not a good ideal to set a root account. Always use sudo instead. Protects you from Human Error.


I LAEK CHICKEN!

#29
Korrupted

Korrupted

    Wandering Samurai

  • Retired
  • 1,623 posts
  • Location:Wandering the world over.
  • Interests:Mac<br />Laptops
I just list it for people who want it. I never said to use it over sudo. :D

#30
kuba

kuba

    InsanelyMac Protégé

  • Members
  • Pip
  • 13 posts
Find a file
To find a file, use:
locate <filename>
Example: locate Callisto.kext
This will look for anything related to Callisto.kext on your system.

--------------------------------

Beside the "locate" command there is the "find" command.
"locate" is dependant of the update database, while "find" is not.
The locate program searches a database for all pathnames which match the
specified pattern. The database is recomputed periodically (usually
weekly or daily), and contains the pathnames of all files which are publicly
accessible.
The find command is dependant on parameters about what you want to find (and where and how).

A casual example for the find command:
$find /usr -name somefile.txt

In the above command you have specified your find path to the /usr directory (or partition). You are searching for a "name" to be specific: "somefile.txt".
The find command has many parameters.
Just open a terminal and type "man find".

Cheers, Solaris Bob

Edit: here is a nice goody for the UNIX oriented MacOSX Geeks: http://rmn.ulaval.ca...y/mac/index.htm

Although it is a copyrighted O'Reilly book, it is been put on the web by a university, so I suppose that part is legally covered... :construction:

#31
willgonz

willgonz

    InsanelyMac Protégé

  • Members
  • PipPip
  • 93 posts
For an editor I like to use Pico. At the terminal type pico and it's there.

#32
Crazor

Crazor

    InsanelyMac Protégé

  • Members
  • PipPip
  • 61 posts
There is an IMPORTANT difference between cp and ditto: ditto preserves ressource forks, whereas cp DOES NOT when used without the proper flags.
Also, ditto is much more powerful: it can handle archives, strip architectures from universal binaries etc.
Consult "man ditto" for more info.

#33
Manaka

Manaka

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 1 posts
There are some other differences between the cp (and other file related UNIX commands) and Ditto that are Mac OS X version specific.

cp and mv in Mac OS X 10.3 and earlier did not support forked files. You had to use the Ditto command (with the appropriate switch - check the man page, or cpMac which was installed if the user had installed the developer tools.

As of Mac OS X 10.4 the cp and mv commands are resource fork aware and will work just fine without having to use Ditto.

#34
Jdhore

Jdhore

    InsanelyMac Protégé

  • Members
  • Pip
  • 24 posts

sudo asks for the USER password, if it has administrative rights (e.g. /etc/sudoers file)
su asks for the ROOT password.

that is the difference


That's not exactly correct...sudo gives you admin (or root) permissions just for the line in which you Sudo'd.
su is to login as root until you close the terminal and you don't su before a command...you:

su
password
command (s)

#35
vassalle

vassalle

    InsanelyMac Protégé

  • Members
  • PipPip
  • 72 posts
hey Dax,

thanks for responding to my earlier comment regard creating the alias.. i followed your instruction but can't seem to run textedit from the terminal.. i get the following message
amir-hamzahs-computer:~ vassalle$ textedit
-bash: /usr/sbin/textedit: Permission denied

i've followed your instruction correctly, double triple checked it but still get the same error. do you know what am i doing wrong?

i'm running 10.4.8 with mikfi kernel.

#36
realfolkblues

realfolkblues

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 212 posts
THanks for this it helps alot! :unsure:

#37
Korrupted

Korrupted

    Wandering Samurai

  • Retired
  • 1,623 posts
  • Location:Wandering the world over.
  • Interests:Mac<br />Laptops
I went ahead and made this a sticky so it's easier to find since Terminal is probably -the- most used program in OSX when experimenting with it.

#38
myha

myha

    InsanelyMac Protégé

  • Members
  • Pip
  • 8 posts
  • Gender:Male
  • Location:ljubljana, Slovenia
Hi,

can someone please tell me how to use aliases on mac? On linux I had .bashrc into which I added the aliases, how to do it on mac?

Thanks, BR

#39
asap18

asap18

    O RLY?

  • Donators
  • 1,423 posts
Usually you can just right click the file/folder and hit "make alias"

#40
myha

myha

    InsanelyMac Protégé

  • Members
  • Pip
  • 8 posts
  • Gender:Male
  • Location:ljubljana, Slovenia
Hi,

I ment aliases from console...

for example:
ll="ls -la"
this is what I use on linux...





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy