2007-12-17

Alias - how to

Definition (alias [ˈeiliəs] noun):
a false name

Example: What alias did the crook use this time?
Arabic: إسْم مُسْتَعَار
Chinese (Simplified): 化名
Chinese (Traditional): 化名
Czech: falešné jméno
Danish: alias; dæknavn
Dutch: alias
Estonian: valenimi
Finnish: peitenimi
French: faux nom
German: der Deckname
Greek: ψευδώνυμο
Hungarian: álnév
Icelandic: falskt nafn, tökuheiti
Indonesian: nama palsu, nama lain
Italian: pseudonimo

Japanese: 偽名, 通称
Korean: 별명
Latvian: pieņemts vārds
Lithuanian: slapyvardis, pravardė
Norwegian: dekknavn
Polish: pseudonim, fałszywe nazwisko
Portuguese (Brazil): pseudônimo
Portuguese (Portugal): pseudónimo
Romanian: supranume
Russian: кличка; прозвище
Slovak: falošné meno
Slovenian: lažno ime
Spanish: seudónimo
Swedish: alias
Turkish: sahte a
source: dictionary.com


Alias command definition:

Alias is a built-in shell command that allows you create shortcuts/synonyms for other shell commands.

How to make an alias:
  • Sintax
alias [name=['command']]
  • example - make an alias for clear command:
$ alias cl='clear'
  • description: now when you type cl at your terminal, is the same thing as type clear. This can be used for more and/or long stings..
  • other alias:
$ alias p='pwd'

$ alias x="exit"

$ alias folderx='cd /home/your_user/Desktop/folderx'


How to remove an alias:

  • Sintax
unalias [alias_name]
  • example - remove an alias for clear command:
$ unalias cl

Note:

When the computer is rebooted all alias will be lost.
How to prevent it? All alias must be added to .bashrc file located at your user folder (example: /home/uterrorista/.bashrc)
  • example:
$ gedit /home/uterrorista/.bashrc
  • paste:
alias cl='clear'
etc...
  • now you have to 'compile' your .bashrc file
$ source .bashrc
  • Now cl alias it's saved..
My tutorial:

Make an alias to create other alias..
  • Edit .bashrc
$ cd
$ gedit .bashrc

  • and paste (replace your_user_name with your nick session):
## Add new alias and compile i
alias aalias='gedit /home/
your_user_name/.bashrc && source /home/your_user_name/.bashrc'
  • compile
$ source .bashrc
  • Now you can add the alias you want just simple doing:
$ aalias
  • add (for example. you can make now your desired alias):
## One folder up
alias up='cd ..'

## Clear screen
alias cl='clear'

alias ff='find . -name $*'
alias untar='tar zxvf'
alias p='pwd'

alias ls="ls --color=auto"
alias ll="ls -l --color=auto"
alias la="ls -l -a --color=auto"

alias x="exit"

alias compilar='sudo ./configure && sudo make && sudo make install'

alias apti='sudo apt-get install'
alias aptud='sudo apt-get update'
alias aptug='sudo apt-get upgrade'

alias aptar='sudo apt-get autoremove'
alias aptr='sudo apt-get remove'

alias aptc='sudo apt-get clean'
alias aptac='sudo apt-get autoclean'


function today {
echo "Today's date is:"
date +"%A, %B %-d, %Y"
}


  • Note: you if have noticed i have a function on my .bashrc file - function today. To run it type: today.
  • to remove an alias: just edit the .bashrc file (aalias) and remove/delete the alias you don't need anymore..
Be free to submit a comment and post your alias..

2007-12-08

Bluetooth @ ubuntu - kdebluetooth/kbluetooth

I've some difficulties connecting my Nokia 6820 to the Laptop (maybe it was just my ignorance...)
And know i've a band new Sony Ericsson M600i.

The question survived : How to send files to my phone?

I was using the default gnome bluetooth manager... That was not enough..
I did some research and found out that Kde bluetooth manager was (much) better.

Screenshots



How to use

  • Launch kbluetooh
    An icon will appear at Notification area.
  • Click and you'll get the window previously showed..
    Then the Computer will automatically scan for bluetooth devices(e.g: M600i.box). Remember to turn on your bluetooth's phone.
  • Click on M600i.box icon, then File transfer/Obex File Transfer.
  • Now check your mobile phone. A message asking permission to pair the phone with computer should pop up. Accept it. And enter 'pair code'. At your computer will pop up a window asking the same 'pair code'.
Now you have the two devices are paired. You can explore your mobile content. Copy/Drag files wherever you want to.
Note: depending your mobile phone model you'll still need to check your phone to accept the connection everytime you explore a different folder at your computer.


Install
  • Direct link:
install
  • or console:
sudo apt-get install kdebluetooth

  • Note: you will need to install konqueror and obexftp at least..
    Don't know if any more dependences are necessary because I've KDE installed on my computer.