shell1
shebang = sharp-bang = #!
1.echo $PATH
export PATH="$PATH:/home/user/bin"
PREPEND
prepend() { [ -d "$2" ] && eval $1=\"$2':'\$$1\" && export $1; }
2.echo -e "\e[1;31m This is red text \e[0m"
0 black 30 red 31 green 32 yellow 33 bule 34 yangred 35 qing 36 white 37
backgroud color 0 black 40 red 41 green 42 y 43 bule 44 yangred 45 qing 46 white 47
3.env
cat /proc/$PID/environ
pgrep gedit -> serch process ID
4.let (()) [ ] bc
echo "scale=2;22/7" | bc
5.$?
echo $?
6. command | tee FILE1 FILE2 | otherCommand
cat a* | tee -a out.txt | cat -n # -a add
7.declare -A ass_array
8.alias rm='cp $@ ~/backup && rm $@'
unalias
\command
&& yu
|| huo
-eq =
-ne !
-gt >
-lt <
-ge >=
-le <=
9. if condition;
then
commands;
fi
if conditon;
then
commands;
else if condition; then
commands;
else
commands;
fi
10.
find
find . -type f -print
file type : f l d c b s p
-atime
-mtime
-ctime
find . -type f -atime -7 -print
-amin
-mmin
-cmin
find . -type f -amin +7 -print
-newer
find . -type f -newer file.txt -print
find . -type f -size +2k
-2k
2k
find . -type f -perm 644 -print
find . -type f -name "*.php" ! -perm 644 -print
find . -type f -user slynux -print
find . -type f -name "*.swp" -delete
find . -type f -user root -exec chown slynux { } \;
find . -type f -name '*.c' -exec cat { } \;>all_c_files.txt
find . -type f -name '*.c' -exec cat { } >all_c_files.txt \;
find . -type f -name '*.c' -exec cat { } >all_c_files.txt +
find . -type f -mtime +10 -name "*.txt" -exec cp { } OLD \;
find . -type f -name "*.txt" -exec printf "text file: %s\n" { } \;
11. xargs
echo "split1Xsplit2Xsplit3X" | xargs -d X
echo "splitXsplitXsplitXsplit" | xargs -d X -n 2
shell1的更多相关文章
- hadoop入门手册4:Hadoop【2.7.1】初级入门之命令:文件系统shell1
问题导读1.Hadoop文件系统shell与Linux shell有哪些相似之处?2.如何改变文件所属组?3.如何改变hdfs的文件权限?4.如何查找hdfs文件,并且不区分大小写? 概述文件系统 ( ...
- shell--1.shell 相关及变量
1.shell脚本解释器 Bourme Shell (/usr/bin/sh 或 /bin/sh ) Bourme Again Shell ( /bin/bash ) C Shell ( /usr/b ...
- 执行shell文件是,提示chmod: 更改'./shell1.sh' 的权限: 不允许的操作。
- 自学Linux Shell1.1-Linux初识
点击返回 自学Linux命令行与Shell脚本之路 1.1-Linux初识(架构.内核.shell) 1. Linux架构 Linux系统一般有4个主要部分:内核.shell.文件系统和应用程序.(有 ...
- 自学Linux Shell1.2-Linux目录结构
点击返回 自学Linux命令行与Shell脚本之路 1.2-Linux目录结构 /: 根目录,一般根目录下只存放目录,不要存放文件,/etc./bin./dev./lib./sbin应该和根目录放置 ...
- 自学Linux Shell1.3-Linux文件系统
点击返回 自学Linux命令行与Shell脚本之路 1.3-Linux文件系统 文件系统是文件存放在磁盘等存储设备上的组织方法.Linux系统能支持多种目前流行的文件系统,如EXT2. EXT3. F ...
- shell-1.shell概述、2.shell脚本执行方式
目录
- Linux之Shell1
1.输出命令:echo echo [选项] [输出内容] : -e 支持反斜线控制的字符转换.(类似于C语言的\) \\ 输出\本身 \t Tab键 \n 换行符 \f 换页符 ...
- 【学习笔记】Shell-1 变量:命名规范、变量赋值/取值/取消、局部变量/全局变量、预设环境变量
1.Shell变量 从变量的实质上来说,变量名是指向一片用于存储数据的内存空间. Shell变量是一种弱类型的变量,即声明变量时不需要指定其变量类型,也不需求遵循“先声明再使用”的规定,想用即可用. ...
随机推荐
- SQL 数据类型
Microsoft Access.MySQL 以及 SQL Server 所使用的数据类型和范围. Microsoft Access 数据类型 数据类型 描述 存储 Text 用于文本或文本与数字的组 ...
- day18-网络编程基础(一)
勿骄勿燥,还是要定下心学习,还有有些没定下心 1.基础知识 2.tcp与udp协议 3.网络套接字 4.基于c/s结构的服务器客户端的实验 开始今日份总结 1.基础知识 现有的软件,绝大多数是基于C/ ...
- 使用html2canvas.js实现页面截图并显示或上传
最近写项目有用到html2canvas.js,可以实现页面的截图功能,但遭遇了许多的坑,特此写一篇随笔记录一下. 在使用html2canvas时可能会遇到诸如只能截取可视化界面.截图没有背景色.svg ...
- .net core 的图片处理及二维码的生成及解析
写代码这事,掐指算来已经十有余年. 从html到css到javascript到vbscript到c#,从兴趣到职业,生活总是失落与惊喜并存. 绝大部分时候,出发并不是因为知道该到哪里去,只是知道不能再 ...
- IntelliJ IDEA 2018.3 重大升级,哪些功能打动了你?
前言 2018.11.28 IntelliJ IDEA 2018.3 正式版发布.对于一个忠实爱好者,迫不及待的我下载了最新版本来体验下.而且 IDEA 今年的第三次重大更新提供了不容错过的显著功能! ...
- 在Web界面中实现Excel数据大量导入的处理方式
在早期Bootstrap框架介绍中,我的随笔<结合bootstrap fileinput插件和Bootstrap-table表格插件,实现文件上传.预览.提交的导入Excel数据操作流程> ...
- Python + Tornado 搭建自动回复微信公众号
1 通过 pip 安装 wechat-python-sdk , Requests 以及 Tornado pip install tornado pip install wechat-sdk pip i ...
- 开发工具IntelliJ IDEA的安装步骤及首次启动和创建项目
开发工具IDEA概述 DEA是一个专门针对Java的集成开发工具(IDE),由Java语言编写.所以,需要有JRE运行环境并配置好环境变量.它可以极大地提升我们的开发效率.可以自动编译,检查错误.在公 ...
- spring4配置文件详解
转自: spring4配置文件详解 一.配置数据源 基本的加载properties配置文件 <context:property-placeholder location="classp ...
- MySQL 中触发器的应用
在一个教育系统里面,有 科目表 ,章节表(每一科目对应若干大章节),小节表(每一大章节下面有若干小节),习题表(每一小节对应若干习题), 在后台管理系统中 有这样几个功能要实现,在 科目列表页面中 ...