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 ...
随机推荐
- 基于select类型多路IO复用,实现简单socket并发
还有很多缺限,如客户断开无限重复 以下转至老师博客: server: #!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = " ...
- delphi读取xml文件
功能: 根据省份更新地市信息 -------------------------------------------------------------------------------} proc ...
- py2exe 打包的两种方式
cmd模式 #!/usr/bin/python #-*- coding: UTF-8 -*- from distutils.core import setup import py2exe setup( ...
- 一:elasticsearch常用操作总结
索引 搜索 mapping 分词器 1.创建索引 http://192.168.65.131:9200/smartom_index 2.查看索引: http://192.168.65.131:9200 ...
- NP完全性理论与近似算法
转自:http://www.cnblogs.com/chinazhangjie/archive/2010/12/06/1898070.html 一.图灵机 根据有限状态控制器的当前状态及每个读写头读到 ...
- .net core 连接sql server 时提示Connection Timeout Expired
.net core开发环境是ubuntu LINUX, 在ubuntu 上 telnet 数据库IP 端口是通的. SQL SERVER 是2008 ,未打SP补丁. 打完 SQL SERVER 2 ...
- 关于Javascript闭包(Closure)
闭包(closure)是Javascript语言的一个难点,也是它的特色,很多高级应用都要依靠闭包实现. 一.变量的作用域 要理解闭包,首先必须理解Javascript特殊的变量作用域. 变量的作用域 ...
- [转][C#]HttpClient 代码示例
转自:https://www.cnblogs.com/amosli/p/3918538.html 也参考了:https://www.cnblogs.com/ShadowFiend007/p/80668 ...
- Butter Knife 使用方法
获取控件 @InjectView(R.id.image_show_password)ImageView image_show_password; 控件事件 @OnClick(R.id.btn_subm ...
- centos 7安装搜狗输入法
1.安装alien依赖软件 sudo yum install alien -y 2.安装依赖软件 sudo yum install qtwebkit -y 3.转换rpm包 sudo alien -r ...