source FileName 等效于. FileName,注 . 和 FileName 有空格

source命令也称为“点命令”,也就是一个点符号(.),作用是在当前bash环境下读取并执行FileName中的命令。该filename文件可以无"执行权限"

source命令通常用于重新执行刚修改的初始化文件,使之立即生效,而不必关闭终端再打开

顺序执行几个指令

如果需要依次输入几个指令,如下:
make mrproper
make menuconfig
make dep
make clean
make bzImage
…………

可以把这些命令做成一个文件,让它自动顺序执行,用source命令就可以做到这一点,它的作用就是把一个文件的内容当成shell来执行,如新建一个文件叫“make_command”,在其中输入一下内容:
make mrproper &&
make menuconfig &&
make dep &&
make clean &&
make bzImage &&
make modules

文件建立好之后,只需要输入如下指令:

source make_command

注:&&命令表示顺序执行由它连接的命令,但是只有它之前的命令成功执行完成了之后才可以继续执行它后面的命令。其他用法参考“linux 多命令执行”

脚本最好用 vim 编写,在 window 上可能会出现编码问题,导致识别不了指令,肉眼看不出来

linux command ------ source的更多相关文章

  1. Linux Command Line 解析

    Linux Command Line 解析 0 处理模型 Linux kernel的启动包括很多组件的初始化和相关配置,这些配置参数一般是通过command line进行配置的.在进行后续分析之前,先 ...

  2. [笔记]The Linux command line

    Notes on The Linux Command Line (by W. E. Shotts Jr.) edited by Gopher 感觉博客园是不是搞了什么CSS在里头--在博客园显示效果挺 ...

  3. linux command useradd

    Linux command useradd [Purpose]        Learning linux command useradd to create a new user or update ...

  4. linux command mktemp

    Linux command mktemp [Purpose]        Learning linux command mktemp to create a temporary file or di ...

  5. linux command dialog

    Linux command dialog [Purpose]        Learning how to use dialog commad, do  man-machine interaction ...

  6. 《The Linux Command Line》 读书笔记04 Linux用户以及权限相关命令

    Linux用户以及权限相关命令 查看身份 id:Display user identity. 这个命令的输出会显示uid,gid和用户所属的组. uid即user ID,这是账户创建时被赋予的. gi ...

  7. 《The Linux Command Line》 读书笔记02 关于命令的命令

    <The Linux Command Line> 读书笔记02 关于命令的命令 命令的四种类型 type type—Indicate how a command name is inter ...

  8. 《The Linux Command Line》 读书笔记01 基本命令介绍

    <The Linux Command Line> 读书笔记01 基本命令介绍 1. What is the Shell? The Shell is a program that takes ...

  9. Linux Command Line Basics

    Most of this note comes from the Beginning the Linux Command Line, Second Edition by Sander van Vugt ...

随机推荐

  1. jenkins pipeline 部署

    一.git 版本控制结合jenkins 发布 sh-4.2$ git branch sh-4.2$ git chekout master sh-4.2$ git tag v1.1 sh-4.2$ gi ...

  2. 博客目录 Blog directory

    Linux 学习笔记 Linux/Mac 挂载远程服务器目录到本地 --Mount remote server directory to local PC 远程连接服务器端Jupyter Notebo ...

  3. Catlike学习笔记(1.3)-使用Unity画更复杂的3D函数图像

    第三篇来了-今天去参加了 Unite 2018 Berlin,感觉就是....非常困...回来以后稍微睡了下清醒了觉得是时候认真学习下了,不过讲的很多东西都是还没有发布或者只有 Preview 的版本 ...

  4. [转载] JVM 内存结构

    转载自:http://gityuan.com/2015/10/17/java-memory/

  5. PAT甲题题解-1070. Mooncake (25)-排序,大水题

    #include <iostream> #include <cstdio> #include <algorithm> #include <string.h&g ...

  6. group by 和count的联合使用问题 [转]

    group by 和count的联合使用问题 今天写查询语句遇到一个问题,就是用group by进行分组以后,用count统计分组以后的个数, 开始写的语句大体是: select count(m.fb ...

  7. Notes of Daily Scrum Meeting(12.21)

    今天的燃尽图把周六的进度加了进来,由于我的失误没有及时更新TFS,所以出现了一些错误,向大家道歉. 下面是今天的任务总结: 团队成员 今日团队工作 陈少杰 继续进行网络连接的调试 王迪 测试搜索的功能 ...

  8. 第二阶段Sprint10

    昨天:查看有关“共享平台”的资料,看如何实现上传下载功能,并尝试编码,没有成功 今天:集合三个人的代码,整合到一起,修复出现的Bug 遇到的问题:看Bug没有出现,但功能不是停止运行就是部分不能用,只 ...

  9. 第四次WBS

    分解原则 1.将主体目标逐步细化分解,最底层的日常活动可直接分派到个人去完成: 2.每个任务原则上要求分解到不能再细分为止: 3.日常活动要对应到人.时间和资金投入. 二.任务分解的方法 1.采用树状 ...

  10. ElasticSearch 2 (37) - 信息聚合系列之内存与延时

    ElasticSearch 2 (37) - 信息聚合系列之内存与延时 摘要 控制内存使用与延时 版本 elasticsearch版本: elasticsearch-2.x 内容 Fielddata ...