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的更多相关文章

  1. hadoop入门手册4:Hadoop【2.7.1】初级入门之命令:文件系统shell1

    问题导读1.Hadoop文件系统shell与Linux shell有哪些相似之处?2.如何改变文件所属组?3.如何改变hdfs的文件权限?4.如何查找hdfs文件,并且不区分大小写? 概述文件系统 ( ...

  2. shell--1.shell 相关及变量

    1.shell脚本解释器 Bourme Shell (/usr/bin/sh 或 /bin/sh ) Bourme Again Shell ( /bin/bash ) C Shell ( /usr/b ...

  3. 执行shell文件是,提示chmod: 更改'./shell1.sh' 的权限: 不允许的操作。

  4. 自学Linux Shell1.1-Linux初识

    点击返回 自学Linux命令行与Shell脚本之路 1.1-Linux初识(架构.内核.shell) 1. Linux架构 Linux系统一般有4个主要部分:内核.shell.文件系统和应用程序.(有 ...

  5. 自学Linux Shell1.2-Linux目录结构

    点击返回 自学Linux命令行与Shell脚本之路 1.2-Linux目录结构 /:  根目录,一般根目录下只存放目录,不要存放文件,/etc./bin./dev./lib./sbin应该和根目录放置 ...

  6. 自学Linux Shell1.3-Linux文件系统

    点击返回 自学Linux命令行与Shell脚本之路 1.3-Linux文件系统 文件系统是文件存放在磁盘等存储设备上的组织方法.Linux系统能支持多种目前流行的文件系统,如EXT2. EXT3. F ...

  7. shell-1.shell概述、2.shell脚本执行方式

    目录

  8. Linux之Shell1

    1.输出命令:echo echo [选项] [输出内容] : -e  支持反斜线控制的字符转换.(类似于C语言的\) \\ 输出\本身 \t Tab键 \n 换行符 \f 换页符 ...  

  9. 【学习笔记】Shell-1 变量:命名规范、变量赋值/取值/取消、局部变量/全局变量、预设环境变量

    1.Shell变量 从变量的实质上来说,变量名是指向一片用于存储数据的内存空间. Shell变量是一种弱类型的变量,即声明变量时不需要指定其变量类型,也不需求遵循“先声明再使用”的规定,想用即可用. ...

随机推荐

  1. 英语口语练习系列-C07-谈女孩

    <将进酒>·李白 君不见黄河之水天上来,奔流到海不复回. 君不见高堂明镜悲白发,朝如青丝暮成雪. 人生得意须尽欢,莫使金樽空对月. 天生我材必有用,千金散尽还复来. 烹羊宰牛且为乐,会须一 ...

  2. 模块简介:(logging)(re)(subprocess)

    ''' logging模块: logging的日志可以分为 debug():Detailed information, typically of interest only when diagnosi ...

  3. hbase参数配置优化

    因官方Book Performance Tuning部分章节没有按配置项进行索引,不能达到快速查阅的效果.所以我以配置项驱动,重新整理了原文,并补充一些自己的理解,如有错误,欢迎指正. 配置优化 zo ...

  4. Linux安装python2.7

    一.Python安装 以Python-2.7.7为例,安装包:Python-2.7.7.tgz如无特殊说明,以下安装步骤都采用root用户执行 1. 解压Python-2.7.7.tgz tar -x ...

  5. UIImagePickerDelegate - 官方文档说明

    - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDic ...

  6. mysql8 安装笔记

    环境 redhat6.8 ,官网下载 rpm x64 Bund 安装包 安装 rpm -ivh xxx.rpm 安装一系列的rpm. mysql 会创建 mysql 用户及组./etc/my.cnf ...

  7. fisher线性判别

    fisher 判决方式是监督学习,在新样本加入之前,已经有了原样本. 原样本是训练集,训练的目的是要分类,也就是要找到分类线.一刀砍成两半! 当样本集确定的时候,分类的关键就在于如何砍下这一刀! 若以 ...

  8. 【转】IT行业岗位以及发展方向

    以下转自https://blog.csdn.net/qq_23994787/article/details/79847270 职业生涯规划的意义 1.以既有的成就为基础,确立人生的方向,提供奋斗的策略 ...

  9. 关于 i++ 与 ++i

    首先关于这个真的不想在看资料了,自己都背过了,++i 和 i++,在单独使用时,就是 i=i+1. a = ++i        相当于 i=i+1; a = i; (先i = i + 1,再使用i的 ...

  10. vue脚手架搭建项目引用百度地图--出坑

    这是官网地址 https://dafrok.github.io/vue-baidu-map/#/zh/start/installation 需要声明注意的是 BaiduMap 组件容器本身是一个空的块 ...