rsync

コマンド例

option意味

-a, --archive

This is equivalent to -rlptgoD. It is a quick way of saying you want recursion and want to preserve almost everything (with -H being a notable omission). The only exception to the above equivalence is when --files-from is specified, in which case -r is not implied.
Note that -a does not preserve hardlinks, because finding multiply-linked files is expensive. You must separately specify -H.

-H, --hard-links

This tells rsync to look for hard-linked files in the transfer and link together the corresponding files on the receiving side. Without this option, hard-linked files in the transfer are treated as though they were separate files.
Note that rsync can only detect hard links if both parts of the link are in the list of files being sent.

-x, --one-file-system

This tells rsync to avoid crossing a filesystem boundary when recursing. This does not limit the user's ability to specify items to copy from multiple filesystems, just rsync's recursion through the hierarchy of each directory that the user specified, and also the analogous recursion on the receiving side dur-
ing deletion. Also keep in mind that rsync treats a "bind" mount to the same device as being on the same filesystem.
If this option is repeated, rsync omits all mount-point directories from the copy. Otherwise, it includes an empty directory at each mount-point it encounters (using the attributes of the mounted directory because those of the underlying mount-point directory are inaccessible).
If rsync has been told to collapse symlinks (via --copy-links or --copy-unsafe-links), a symlink to a directory on another device is treated like a mount-point. Symlinks to non-directories are unaffected by this option.

-v, --verbose

This option increases the amount of information the daemon logs during its startup phase. After the client connects, the daemon's verbosity level will be controlled by the options that the client used and the "max verbosity" setting in the module's config section.

tar

内容物表示

-v verbose 詳細表示

-f デフォルトのテープには入出力しない

-c

-r

Like -c, but new entries are appended to the archive. Note that this only works on uncompressed archives stored in regular files. The -f
option is required.

-t

List archive contents to stdout.

-u

Like -r, but new entries are added only if they have a modification date newer than the corresponding entry in the archive. Note that this
only works on uncompressed archives stored in regular files. The -f option is required.

-x

Extract to disk from the archive. If a file with the same name appears more than once in the archive, each copy will be extracted, with
later copies overwriting (replacing) earlier copies.

mysql

MySQLセットアップ

#ユーザー権限の表示（grant権限があるか確認)
select host,user,grant_priv from mysql.user;
#lrngsqlユーザーの作成
grant all privileges on *.* to 'lrngsql'@'%' identified by 'password';
#すべてのrootアカウントにgrant_priv=Yを設定
update mysql.user set grant_priv='Y' where user='root';
show tables;