Posts which you will also like.

Wednesday, December 1, 2010

Basic UNIX/LINUX command:cp

This command lets you to copy files.



                                                                                                                                                             
CommandSwitchResult
cpsource destinationIf destination file does not exists then it will be created before copying other wise overwritten.
cpsrc1 src2 src3 destinationcopy more than one files into a single destination
cpsrc* destinationcopy all files beginning with src into destination
cp-i src destinationwarns user before overwriting
cp-R srcdir destinationCopy directory structure



Read More ->>

Basic UNIX/LINUX command:cd command

This command is same as MSDOS cd command which is used for changing directories.

cd:

Command Switch Result
cd ~ username Switches home directory of user
cd Switches to home directory of current user
cd ~ toggles between current and previous directory
cd Desktop / Changes to relative directory desktop
cd .. Changes to one level up in the directory tree
cd ../.. Changes to two level up in the directory tree

Read More ->>

Basic UNIX/LINUX commands:ls command

Some of the most frequently used commands in Linux are:
1.ls: This command is used for directory listing.It is same as dir command in MSDOS.
Switches used with this command are:
COMMAND SWITCH RESULT
ls -a displays all file name including those beginning with a dot
ls -d .* Only filenames beginning with a dot
ls / lists the contents of the root directory
ls -l prints long listing with description of permissions,links,ownership,size etc
ls /dir filenames inside dir
ls -d /dir only shows the description of dir not its content
ls -R recursive file list
ls -t Filenames sorted by last modification time
ls -u Filenames sorted by last access time
ls -i inode number
ls -ltr sorts listing chronologically form older to newer
Read More ->>
DMCA.com Protected by Copyscape Online Plagiarism Tool