GNU coreutils
内核实用程序,针对文本及文件操作。涉及到102条linux命令。
命令列表:cp、install、ln、mv、ls、echo……
常见选项
1.退出状态
2.备份选项
| 短选项 | 长选项 | 注解 |
|---|---|---|
| -b | '--backup'[=method] | 当某个文件存在被移动(mv)、覆盖的情况时,如何备份的指定选项。 短选项不接受任何参数,默认是“--backup=existing“。 |
| -S SUFFIX | --suffix=SUFFIX | 与“-b”同时使用,添加到文件名中。 |
当不指定“method”,有点复杂,建议指定。参数接受“唯一性缩写”、多字符表示,参数如下:
| METHOD参数 | 注解 |
|---|---|
|
none off |
永不备份 |
|
numbered t |
总是进行编号备份 |
|
existing nil |
已有的编号备份,其他的简单备份 |
|
simple never |
简单备份 |
3.目标目录
| 短选项 | 长选项 | 注解 |
|---|---|---|
| -T File | --no-target-directory |
指定普通文件,父目录必须是存在的。格式:install -T large.cnf /etc/my.cnf |
| -t DIR | --target-directory=DIR |
指定目录文件,该目录必须存在。格式:install -t /etc my.cnf 像是复制进去一样,目标在前,且是目录。 |
例子,使用“-T”:
[root@right mag]# ll
total
drwxr-xr-x. root root Dec : back
drwxr-xr-x. root root Dec : mag
[root@right mag]# mv -T mag back
mv: overwrite ‘back’? y
[root@right mag]# ll
total
drwxr-xr-x. root root Dec : back
例子,使用“-t”:
[root@right mag]# ll
total
drwxr-xr-x. root root Dec : back
drwxr-xr-x. root root Dec : mag
[root@right mag]# mv -t mag back
[root@right mag]# ll
total
drwxr-xr-x. root root Dec : mag
[root@right mag]# ls mag/
back
使用“-t”,效果等同于:
[root@right mag]# ll
total
drwxr-xr-x. root root Dec : back
drwxr-xr-x. root root Dec : mag
[root@right mag]# mv back mag
[root@right mag]# ll
total
drwxr-xr-x. root root Dec : mag
[root@right mag]# ls mag/
back
GNU coreutils的更多相关文章
- mac 终端 使用 gnu coreutils 工具 ls 颜色显示
mac 终端默认 ls 命令无颜色显示: 1: 使用 ls -G 可以显示基本颜色 2:使用 gnu coreutils 工具 mac 终端 使用 gnu coreutils 工具 ls 颜色显示 以 ...
- Coreutils - GNU core utilities
coreutils 是GNU下的一个软件包,包含linux下的 ls等常用命令.这些命令的实现要依赖于shell程序.一般在系统中都默认安装,也可自己安装或更新.例如,安装coreutils-6.7. ...
- 【Mac】Mac OS X 安装GNU命令行工具
macos的很多用户都是做it相关的人,类unix系统带来了很多方面,尤其是经常和linux打交道的人. 但是作为经常使用linux 命令行的人发现macos中的命令行工具很多都是bsd工具,跟lin ...
- AutoMySQLBackup 3.0 Bug:"du: WARNING: use --si, not -H"
案例环境: 操作系统版本: Red Hat Enterprise Linux Server release 5.7 64bit 数据库版本 : 5.6.19 MySQL Community Serve ...
- Linux命令学习总结:date命令
命令简介: date 根据给定格式显示日期或设置系统日期时间.print or set the system date and time 指令所在路径:/bin/date 命令语法: date [OP ...
- Linux split拆分文件
200 ? "200px" : this.width)!important;} --> 介绍 split可以将一个大文件拆分成指定大小的多个文件,并且拆分速度非常的快,拆分一 ...
- Linux下怎么查看当前系统的版本
Linux下怎么查看当前系统的版本: uname -r 功能说明:uname用来获取电脑和操作系统的相关信息. 语 法:uname [-amnrsvpio][--help][--version] ...
- 如何以nobody用户执行命令?
最近在logstash中使用nobody用户启动logstash,一想,nobody用户的shell不是/sbin/nologin吗? 不能登录执行命令呀? 于是看了一下它的启动脚本,是使用其他方式进 ...
- centos 7.0 ln命令 和chkconfig 命令介绍 开机自动启 服务
有时候centos需要 程序开机启动的时候 自启动 首先在 /etc/init.d/ cd /etc/init.d 文件夹下建立开机启动项 使用ln命令 使用方式 : ln [options] so ...
随机推荐
- Redis select选择数据库
Redis的功能真是强大,可以做数据库,可以做缓存. 今天发现Redis支持分隔操作空间,使得空间与空间之间互不影响. SELECT index 切换到指定的数据库,数据库索引号 index 用数字值 ...
- python json.dumps(output) ^ SyntaxError: invalid syntax
问题 下面代码在有些机器上执行正常,有些机器上执行报错: import json output={} print json.dumps(output) python代码报错: line 277 pri ...
- sbt第一次运行下载jar包很慢解决办法
一.补充sbt配置文件,添加下载路径 文件结构如下:修改了sbtconfig.txt,repo.properties. sbtconfig.txt配置内容为: # Set the java args ...
- ML: 聚类算法R包-网格聚类
网格聚类算法 optpart::clique optpart::clique CLIQUE(Clustering In QUEst)是一种简单的基于网格的聚类方法,用于发现子空间中基于密度的簇.CLI ...
- Winform 界面全屏 显示状态栏
this.FormBorderStyle = FormBorderStyle.None; this.MaximumSize = new Size(Screen.PrimaryScreen.Workin ...
- VirtualBox中挂载物理磁盘
注1. 详细内容请参考VirtualBox帮助文件. 注2. 需对dos命令有一定了解. 注3. 以下命令均需以管理员身份执行,VirtualBox也需以管理员身份运行. 主要应用host上的vbox ...
- win server 2003 x64 IIS配置
新装IIS第一个报错 The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine 原因是 服务器 IIS ...
- JavaScript之图片操作7
前面总结了很多了有关于图片操作的案例,本次是基于前面的基础,做一个综合的图片轮播效果,需要实现以下功能: 没有任何操作时,图片自动轮播 鼠标悬浮时,图片停止轮播:当鼠标移开,轮播继续 鼠标悬浮时,出现 ...
- Zookeeper的集群安装
Zookeeper的集群安装 关闭防火墙 安装jdk 下载Zookeeper的安装包 解压Zookeeper的安装包 进入Zookeeper的安装目录中conf目录 将zoo_sample.cfg复制 ...
- MyBatis #{} 和 ${} 引用值的用法
1.#{} 引用值的用法 UserMapper配置文件: <select id="queryOne" resultType="cn.tedu.mybatis.bea ...