An alias is nothing but shortcut to commands. The alias command allows user to launch any command or group of commands (including options and filenames) by entering a single word. Use alias command to display list of all defined aliases. You can add user defined aliases to ~/.bashrc file. You can cut down typing time with these aliases, work smartly, and increase productivity at the command prompt.
[click to continue…]
Our FAQ section is updated in last few days with new howtos:
FAQ & Howtos RSS Feed
Get intimated about our new howtos / faqs as soon as it is released via RSS feed.
nixCraft is on Facebook!
Not our Fan yet? We suggest you become one right away! Just visit our Facebook Page. Click on the "like" button.
Shell scripting is fun. It is useful to create nice (perhaps ugly) things (read as solutions) in shell scripting. Now Windows got Powershell. But how does PowerShell measure up to traditional shells like Bash?
Linux Magazine's Marcus Nasarek compares Windows Vista PowerShell with Bash:
Both Bash and the Windows Vista PowerShell include commands for navigating directories, managing files, and launching other programs. System administration is an important duty for the shell, and Bash and PowerShell are equipped to help manage systems from the command prompt. Whereas Bash typically relies on a combination of newer tools and classic Unix utilities, the PowerShell has its own set of command-line programs. Windows refers to PowerShell commands as cmdlets. The PowerShell cmdlet called Get-Process is a counterpart to ps, and the cmdlet Get-Content corresponds to less. PowerShell differs significantly from previous Windows command shells.
Some time I need to work with on Windows Servers and I find this article interesting. However, I prefer to use Perl or Python for complicated stuff.
BASH shell is default on many UNIX / Linux systems. There is an interview with Chat Ramney, maintainer of BASH, the Bourne Again Shell. He talke about his experience maintaining Bash and few other things. From the page:
Bash, or the Bourne-Again Shell is a Unix shell created in 1987 by Brian Fox. According to Wikipedia, the name is a pun on an earlier Unix shell by Stephen Bourne (called the Bourne shell), which was distributed with Version 7 Unix in 1978.
In 1990, Chet Ramey, Manager of the Network Engineering and Security Group in Technology Infrastructure Services at Case Western Reserve University, became the primary maintainer of the language.
Computerworld tracked down Ramey to find out more.
=> The A-Z of Programming Languages: BASH/Bourne-Again Shell
I use Google Calendar exclusively. However to access this product you need to use a web browser. There is nice program called gcalcli (Google Calendar Command Line Interface) which allows to access Google Calendar from bash shell. Now I can see an agenda using a specified start/end time and date from a shell prompt over ssh session :D
gcalcli is a Python application that allows you to access you Google Calendar from a command line. It's easy to get your agenda, search for events, and quickly add new events. Additionally gcalcli can be used as a reminder service to execute any application you want.
- List your calendars
- Show an agenda using a specified start/end time and date
- Search for calendar events
- "Quick add" new calendar events to your default calendar
- Run as a cron job and execute a command for reminders
- Work against specific calendars (default, owner, read-only)
- Color support
- unicode support
Download Google Calendar Command Line Interface
=> Visit official project page here
You can use "type" or "whereis" command to find out which command shell executes and to print binary (command) file location for specified command.
whereis command example
Display ls command location along with man page path:
ls: /bin/ls /usr/share/man/man1p/ls.1p.gz /usr/share/man/man1/ls.1.gz
type command example
Find out which command the shell executes:
type -a ls
ls is aliased to `ls --color=tty'
ls is /bin/ls
Related: How Linux or UNIX Understand which program to run - PART I and How BASH Shell Command Search Sequence Works