SpiderTools.com
Linux Training Experts
home | Order
Page | reseller program |
specials | contact
copyright CyberMontana Inc.


|
Linux
Training Courses in Missoula, MT
|
|
Basic
Linux Training Package:
Date:
Oct.
22-23
Cost: $195.00
This
course is designed to help new Linux users establish a foundation
in Linux so that they can advance quickly in the Linux experience.
|
Fall
Linux Classes
Basic Linux ($195.00) Oct
22-23
Linux Commands(
($110.00) - Oct. 29
Basic Administration
($110.00)- Oct. 30
Gimp Image Editing
($69.99) -
Nov. 5,6,12,13
Gimp Image Editing
II ($49.99) Nov.19,20
Linux Security ($110.00)
-Dec. 3
Package Deal
Regular Price $644.98
Get all 6 Classes Only $499.00
Order
|
Learn
the Power of Linux Commands
cp
The copy command for Linux is cp. This command is a heavily used
command that is simple but allows you to use options that created
a very powerful tool.
Example:
cp /home/fred/text /home/jim/
This command will copy the file text to Jim's home directory.
options
-a retain archival attributes
-b create backup of file instead of overwriting
-d maintain symbolic links
-f force copy
-i interactive mode, prompts before files are overwritten
-l creates links between files copied to directories instead of
actually copying the file
-p preserve existing permissions
-r copy entire directory and subdirectories
-R copy entire directory and subdirectories
-s create symbolic links between file copied to directories instead
of actual copy
-S set a suffix to all new files, default is ~
-u does not copy to newer files
-v verbose mode
-V version-control numbering
-x ignores subdirectories on remote file systems
An
often used option with cp is the -R or -r option that allows you
to copy not only directories but all of the sub-directories that
are contained inside a directory. For example suppose you are
in an office and the office maintains a directory system that
contains policies and procedures as well as all client files which
relate to the running of the business. All of these documents
are located in one directory on the file system called /home/office.
The directory system has been expanded and a new partition has
been created called /business. The
/business partition will contain all of the office material that
is located in /home/office. Therefore,
/home/office needs to be copied to /business. Here is the directory
system that must be copied.
/home/office
/procedures
/policies
/activities
/clients
cp
-R /home/office /business
The
command recursively (that means folders and sub-folders) copies
all of the material in /home/office to /off.
Now
an additional problem may arise. In a Linux file system you have
the ability to set permissions of read/write/execute on each file
individually. Suppose that the file system that was created in
/home/office has individual permissions set on each file in terms
of who may modify each file within the office. You need to then
maintain those file permissions when you copy. That may easily
be accomplished by using the -p option that will maintain permissions
that were originally set. In this example, the same recursive
action is taken by copying all of the files and folders in addition
the permissions are maintained.
cp
-Rp /home/office /business
The
p option is added with the -R.
umount
This will unmount a drive. This command may be used to unmount
a floppy, CDROM, or usb disk. It may also be used to unmount
partitions as well.
Example:
umount /media/cdrom
This
will unmount the CDROM.
Often
new Linux distributions may call your CDROM a CDRECORDER or
DVDRECORDER if they can burn CDs or DVDs.
If
you needed to unmount a partition it wold be the same process.
For example if your partition was a backup partition called
/bk you could unmount that partition wit this command:
umount
/bk
|