It copies a file or a group of files. Copying file overwrites without warning the destination file if it already exists.
SYNTAX: $cp <source> <target>
Example:
$cp file1 file
$cp file1 file2 dir1 (used for copying file to directory)
Friday, August 31, 2012
Remove Directory Command
Used to delete a directory.
SYNTAX: $rmdir <dir>
Example:
$rndir unix
SYNTAX: $rmdir <dir>
Example:
$rndir unix
Change Directory Command
It is used to change from one directory to other.
SYNTAX: $cd <dir>
Example:
$cd unix1
Note: cd.. or cd\ is used to come out from directory
SYNTAX: $cd <dir>
Example:
$cd unix1
Note: cd.. or cd\ is used to come out from directory
Making Directory Command
It is used to create directory
SYNTAX: $mkdir <dirname>
$mkdir <dir> <dir>/<subdir> <dir1>/<subdir1>
Example:
$mkdir Unix
$mkdir Unix Unix/u (Used to create sub directories)
$mkdir test
output: mkdir : can't make test directory
SYNTAX: $mkdir <dirname>
$mkdir <dir> <dir>/<subdir> <dir1>/<subdir1>
Example:
$mkdir Unix
$mkdir Unix Unix/u (Used to create sub directories)
$mkdir test
output: mkdir : can't make test directory
Uname Command
It is used to display operating system and the version user is using.
SYNTAX: $uname
Example:
$uname -r (Used to display version)
$uname -s (Used to display what is operating system & what we are using)
$uname -n (Used to display the host or server name)
SYNTAX: $uname
Example:
$uname -r (Used to display version)
$uname -s (Used to display what is operating system & what we are using)
$uname -n (Used to display the host or server name)
Echo Command
This command is used to display the message on the screen.
SYNTAX: $echo "message"
Example:
$echo "Welcome to Unix"
SYNTAX: $echo "message"
Example:
$echo "Welcome to Unix"
Who Command
This command will provide all current users of the system working on various terminals.
SYNTAX: $who
Example:
$who i am
$who -HU (used to display all details of user)
SYNTAX: $who
Example:
$who i am
$who -HU (used to display all details of user)
Thursday, August 30, 2012
Basic Calculator Command
It is used to perform arithmetic operations.
SYNTAX: $bc
Examples:
$bc
1+2
3
$1*2
2
$bc
12/2
6
$bc
0 base =2
14
1110
SYNTAX: $bc
Examples:
$bc
1+2
3
$1*2
2
$bc
12/2
6
$bc
0 base =2
14
1110
Date Command
It is used to display the current date.
SYNTAX: $date
Examples:
$date
$date +%m (this is used display no.of months)
$date +%h (this is used to display name of the month)
$date '%h%m'
$date +%y (used to display last 2 digits of year)
$date +%D (used to display mm/dd/yy)
SYNTAX: $date
Examples:
$date
$date +%m (this is used display no.of months)
$date +%h (this is used to display name of the month)
$date '%h%m'
$date +%y (used to display last 2 digits of year)
$date +%D (used to display mm/dd/yy)
Friday, August 17, 2012
Calender command
It's a handy tool that you can invoke any time to see the calender of any specific month or a complete year.
SYNTAX: $cal
Example:
$cal
$cal 03 2012
$cal 2012 | more (' |' pipe symbol is used to combine two commands. The o/p of one command may give to i/p of next command)
SYNTAX: $cal
Example:
$cal
$cal 03 2012
$cal 2012 | more (' |' pipe symbol is used to combine two commands. The o/p of one command may give to i/p of next command)
Rules of Unix
> We wont use arrow marks
> Lower case letters
> Space between two commands
Unix Organization Consists of ----
1) Hardware : It is used to execute the command.
2) Kernel:
> Which is used to schedule tasks and Manage storage.
> It is heart of the operating System.
> Kernel tells the computer to read all files on disk & display them on screen
3) Shell:
> Shell is the interpreter between user and the computer system.
> Which connects & interprets users commands, call programs from memory and executes them.
> shell also gives the functionality of "PIPES", where no.of commands can be linked together, & allowing the output of one program to become input of another program.
There are 3 types of shell. They are
> Bourne Shell(.sh)
> CShell (.csh)
> Kourn Shell (.ksh)
> Using CShell we can convert actual commands in unix into our own command. In Cshell we have DOS Key(we will get previous commands)
> In Unix there is no DOS Key.
4) Tools & Applications:
> Has the functionality to the operating System.
> Tools are grouped into categories for certain functions, such as word processing, business application and Programming etc.
Salient Futures of Unix
The following are the salient futures of Unix
> Multi-User Capability : More than one user can interact with host or no.of user can connect to host.
> Multitasking Capability
> Security : We can provide security for files to read, write and execute.
We can encrypt files by converting readable to unreadable format.
Providing log in with 3 different terminals Dumb terminal, Terminal Emulation and Dial-In Terminal
> Communication : Interaction between user or between server.
> Portable
> Multi-User Capability : More than one user can interact with host or no.of user can connect to host.
> Multitasking Capability
> Security : We can provide security for files to read, write and execute.
We can encrypt files by converting readable to unreadable format.
Providing log in with 3 different terminals Dumb terminal, Terminal Emulation and Dial-In Terminal
> Communication : Interaction between user or between server.
> Portable
What is Unix?
UNIX is an operating system. The job of an operating system is to orchestrate the various parts of the computer -- the processor, the on-board memory, the disk drives, keyboards, video monitors, etc. -- to perform useful tasks. The operating system is the master controller of the computer, the glue that holds together all the components of the system, including the administrators, programmers, and users. When you want the computer to do something for you, like start a program, copy a file, or display the contents of a directory, it is the operating system that must perform those tasks for you.
More than anything else, the operating system gives the computer its recognizable characteristics. It would be difficult to distinguish between two completely different computers, if they were running the same operating system. Conversely, two identical computers, running different operating systems, would appear completely different to the user.
UNIX was created in the late 1960s, in an effort to provide a multiuser, multitasking system for use by programmers. The philosophy behind the design of UNIX was to provide simple, yet powerful utilities that could be pieced together in a flexible manner to perform a wide variety of tasks.
Subscribe to:
Posts (Atom)