Monday, August 13, 2018

How to Create alias in windows and unix operating system

This article shows how to create a alias in both windows and Unix command prompt.

1. Windows:

1. Open the command prompt. ( Run -> type "cmd" and hit enter.

2. use the below command to create an alias.
            doskey <alias>=<command>

For ex : if i want to set alias sys to connect the database i use the below command.
* doskey sys=sqlplus system/oracle

Now if you type sys it will directly connect to the database by running the sqlplus command.


UNIX:
Now we will see how to create alias in Unix operating system.

1. Login to bash shell.

2. Below is the command used to create an alias in UNIX.

* alias <alias_name>=<command>

For ex : if i want to set l to run the command ls -lrt use the below command.

alias l="ls -lrt"

When you type l it will run the command you have set for this alias.

MBP:~ nirmalg$ alias l="ls -lrt"
MBP:~ nirmalg$ l
total 0
drwxr-xr-x+  4 user1  staff   128 Mar 29 16:37 Public
drwx------+  5 user1  staff   160 Apr  9 22:01 Pictures
drwxr-xr-x   6 user1  staff   192 Apr 24 06:57 Applications

MBP:~ nirmalg$ 


How to take a screenshot on your MacBook Pro


You can capture your entire screen or just a selected portion of it. The screenshot is automatically saved to your desktop.

How to take a screenshot of your entire screen
Press Shift-Command (⌘)-3.
Find the screenshot as a .png file on your desktop.

How to take a screenshot of a selected portion of your screen
Press Shift-Command-4. The pointer changes to a crosshair.
Move the crosshair to where you want to start the screenshot, then drag to select an area.
While dragging, you can hold Shift, Option, or Space bar to change the way the selection moves.

When you've selected the area you want, release your mouse or trackpad button. To cancel, press the Esc (Escape) key before you release the button.
Find the screenshot as a .png file on your desktop.

How to take a screenshot of a window
Press Shift-Command-4. The pointer changes to a crosshair.
Press the Space bar. The pointer changes to a camera.
Move the camera over a window to highlight it.
Click your mouse or trackpad. To cancel, press the Esc (Escape) key before you click.
Find the screenshot as a .png file on your desktop.
This works with windows in the Finder and most apps.

How to take a screenshot of a menu
Click the menu to reveal its contents.
Press Shift-Command-4. The pointer changes to a crosshair.
Drag to select the menu.
Release your mouse or trackpad button. To cancel, press the Escape (esc) key before you release the button.
Find the screenshot as a .png file on your desktop.
These steps capture the contents of a menu, but not its title:
Click the menu to reveal its contents.
Press Shift-Command-4. The pointer changes to a crosshair.
Press the Space bar. The pointer changes to a camera.
Move the camera over the menu to highlight it.
Click your mouse or trackpad. To cancel, press the Esc (Escape) key before you click.
Find the screenshot as a .png file on your desktop.

How to take a screenshot of the Touch Bar
If you have a Mac with a Touch Bar and macOS Sierra 10.12.2 or later:
Press Shift-Command-6.
Find the screenshot as a .png file on your desktop.