使用sudoedit命令可以以另外一个用户身份编辑文件。
语法格式:sudoedit [参数] [文件]
常用参数:
-u | 以指定用户运行命令 |
-g | 以指定主要组群运行命令 |
-n | 防止提示用户输入密码 |
参考实例
以用户zhangsan来编辑/root/install.log文件:
[[email protected] ~]# sudoedit /root/install.log
');mask-image:url('data:image/svg+xml;utf8,');mask-mode:alpha;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-position:center;mask-position:center;border-radius:0}}.wp-block-image :where(.has-border-color){border-style:solid}.wp-block-image :where([style*=border-top-color]){border-top-style:solid}.wp-block-image :where([style*=border-right-color]){border-right-style:solid}.wp-block-image :where([style*=border-bottom-color]){border-bottom-style:solid}.wp-block-image :where([style*=border-left-color]){border-left-style:solid}.wp-block-image :where([style*=border-width]){border-style:solid}.wp-block-image :where([style*=border-top-width]){border-top-style:solid}.wp-block-image :where([style*=border-right-width]){border-right-style:solid}.wp-block-image :where([style*=border-bottom-width]){border-bottom-style:solid}.wp-block-image :where([style*=border-left-width]){border-left-style:solid}.wp-block-image figure{margin:0}/*]]>*/
使用sudoedit命令可以以另外一个用户身份编辑文件。
语法格式:sudoedit [参数] [文件]
常用参数:
-u | 以指定用户运行命令 |
-g | 以指定主要组群运行命令 |
-n | 防止提示用户输入密码 |
参考实例
以用户zhangsan来编辑/root/install.log文件:
[[email protected] ~]# sudoedit /root/install.log