首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

linux 常用命令 杂记

1.cat cat 命令用于连接文件并打印到标准输出设备上。 使用权限 所有使用者 2.Linux chgrp命令用于变更文件或目录的所属群组。 3.Linux/Unix 的文件调用权限分为三级 : 文件拥有者、群组、其他。 利用 chmod 可以藉以控制文件如何被他人所调用。 u 表示该文件的拥有者, g 表示与该文件的拥有者属于同一个群体(group)者, o 表示其他以外的人, a 表示这三者皆是。 + 表示增加权限、 - 表示取消权限、 = 表示唯一设定权限。 r 表示可读取, w 表示可写入, x 表示可执行, X 表示只有当该文件是个子目录或者该文件已经被设定过为可执行。 实例见:https://blog.csdn.net/jiangyu1013/article/details/79656591 4.Linux cmp命令用于比较两个文件是否有差异。 当相互比较的两个文件完全一样时,则该指令不会显示任何信息。 若发现有所差异,预设会标示出第一个不同之处的字符和列数编号。 若不指定任何文件名称或是所给予的文件名为"-", 则cmp指令会从标准输入设备读取数据。 5.Linux file命令用于辨识文件类型。 通过file指令,我们得以辨识该文件的类型。 如执行:file install.log 会输出文件的类型数据:UTF-8 Unicode text file install.log install.log: UTF-8 Unicode text

02

Rsync完全配置

系统环境---Rsync完全配置 rsync version 2.6.3 protocol version 28 Slackware 9.2 配置/etc/rsyncd.conf 如果没有创建rsyncd.conf文档,自己需要创建rsyncd.conf文档(下面其实配置相同) [root@linuxas3 root]# vi /etc/rsyncd.conf uid=nobody gid=nobody max connections=4 use chroot=no log file=/var/log/rsyncd.log pid file=/var/run/rsyncd.pid lock file=/var/run/rsyncd.lock #auth users=root secrets file=/etc/rsyncd.secrets [postfix] path=/var/mail comment = backup mail ignore errors read only = yes list = no auth users = postfix [netkiller] path=/home/netkiller/web comment = backup 9812.net ignore errors read only = yes list = no auth users = netkiller [pgsqldb] path=/var/lib/pgsql comment = backup postgresql database ignore errors read only = yes list = no 选择说明 uid = nobody gid = nobody use chroot = no # 不使用chroot max connections = 4 # 最大连接数为4 pid file = /var/run/rsyncd.pid #进程ID文件 lock file = /var/run/rsync.lock log file = /var/log/rsyncd.log # 日志记录文件 secrets file = /etc/rsyncd.pwd # 认证文件名,主要保存用户密码,权限建议设为600,所有者root [module] # 这里是认证的模块名,在client端需要指定 path = /var/mail # 需要做镜像的目录 comment = backup xxxx # 注释 ignore errors # 可以忽略一些无关的IO错误 read only = yes # 只读 list = no # 不允许列文件 auth users = postfix # 认证的用户名,如果没有这行,则表明是匿名 [other] path = /path/to... comment = xxxxx 密码文件A,(被认证的用户,就是本地与要其它地同上时,需要的认证用户) 在server端生成一个密码文件/etc/rsyncd.pwd [root@linuxas3 root]# echo postfix:xxx >>/etc/rsync_passwd [root@linuxas3 root]# chmod 600 /etc/rsync_passwd 密码文件B,(为远程用户的认证:就是其它需要与本地同步时,远程PC在执行同步时所需要的帐号) 在server端生成一个密码文件/etc/rsyncd.secrets [root@linuxas3 root]# echo postfix:xxx >>/etc/rsyncd.secrets

03

扫码

添加站长 进交流群

领取专属 10元无门槛券

手把手带您无忧上云

扫码加入开发者社群

相关资讯

热门标签

活动推荐

    运营活动

    活动名称
    广告关闭
    领券