Tuesday, 1 February 2011

rsync is basically a glorious copy, which does synchronization while copying. So that in the effect only files changed are copied and rest are left as it is . This saves time and bandwidth. Very useful. The general syntax is :
rsync options source destination
For copy between remote and local here is a example:
rsync -avzu thegeek@192.168.1.175:/var/lib/rpm /root/temp
a means
- recursing while preserving time stamp, file permissions and symbolic links. Very useful option
v = verbose
z = use compression to save time and bandwidth
u = don't overwrite files in destination that is different from that in source. If file is absent in dest. then only it is copied. very useful if you have made some configuration changes in the destination and don't want to loose the changes while sync'ing for other files.

or better still
rsync -avzu -e ssh thegeek@192.168.1.175:/var/lib/rpm /root/temp

Same as above expect that synchronization is done over ssh so that no one will be able to snip the network packet and understand what is being transfered

other usefull option to pass along with the usefull avz we have seen above are:

-d = synchronize only directories not files
--progress = show progress when syncing
--delete = make the dest a exact copy of source. it deletes the files in dest. that is not there in source.
--exclude = exclude the pattern from copying.
--max-size= = do not transfer files larger than the specified limit.


File system Quota
/sbin/quotacheck -avug

Checks the filesys for quota information.
where
a= Check all quota-enabled filesystem
v= verbose
u= check user based quota
g= check group based quota

#edquota
edquota command opens the quota settings for the specific user in a editor. In that first soft and hard limit is for filesys and seconf is hard and soft limit for number of inodes.
Hard limit is a limit after which does not permit file creation after that limit is reached.
Soft limit is a limit after which user is warned about crossing the limit.

#repqouta
repquota report the disk quota usage for the users and groups.

* dmidecode gives us hardware information. Not just as currently used but the max capacity and current state of hardware.

* dmesg shows hardware information as detected by kernel

* The timezone of the system is defined by the contents of /etc/localtime.

No comments:

Post a Comment