Jump to content

How to make an "Alias" via console?


  • Please log in to reply
6 replies to this topic

#1
enb14

enb14

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 615 posts
  • Gender:Male
  • Location:Central America
Hi guys I would like to know how I can create an Alias via console and how can I edit an existing one.

#2
macgirl

macgirl

    Stargate's Pharaoh

  • Retired
  • 7,615 posts
  • Gender:Female
  • Location:Mexico City
  • Interests:Techie gadgets
for all users in /etc/bashrc

for just one user in their own home directory .bashrc

just add the aliases, example:
alias dir='ls -alFG'
alias rm='rm-i'

#3
enb14

enb14

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 615 posts
  • Gender:Male
  • Location:Central America

for all users in /etc/bashrc

for just one user in their own home directory .bashrc

just add the aliases, example:
alias dir='ls -alFG'
alias rm='rm-i'



For example if I wanna create an alias for Unreal Tournament 2004 (ut2004.app) located in

/Volumes/my_Partition/ut2004.app/Contents/MacOS/Unreal Tournament 2004

File to the called by this alias

/Volumes/my_Partition/ut2004.app/System/ut2004-mac-bin

How should I procede?

#4
macgirl

macgirl

    Stargate's Pharaoh

  • Retired
  • 7,615 posts
  • Gender:Female
  • Location:Mexico City
  • Interests:Techie gadgets
Oh, that kind of alias.

There are to ways, in Finder you select the file and with the Option (Windows) key and Command (Alt) key presed together you drag it to any place you want and automatically it creates an alias of the file, you can move it to whatever you want and rename it as whatever you want.

The other way (the unix way) is this, inTerminal type:

ln -s /path-to-file/real-file /path-to-resulting-file/new-file

ln command create a link.

#5
enb14

enb14

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 615 posts
  • Gender:Male
  • Location:Central America
Thank you very much, I'll try it tonight.

#6
bluedragon1971

bluedragon1971

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 696 posts
By the way, this is also an excellent way to share an iPhoto or iTunes library between several users on the same system, assuming they both belong to a group that has read-write access to the folder.

#7
blackentangled

blackentangled

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 339 posts
lol, what's an "alias"? a 'lil enlightenment would do...





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