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)
Unix
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)
Subscribe to:
Posts (Atom)