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. MySql+Socket 完成数据库的增查Demo

    需求: 利用MySql数据库结合前端技术完成用户的注册(要求不使用Web服务技术),所以 Demo采用Socket技术实现Web通信. 第一部分:数据库创建 数据库采用mysql 5.7.18, 数据 ...

  2. tkinter 对键盘和鼠标事件的处理

    鼠标事件 <ButtonPress-n> <Button-n> <n> 鼠标按钮n被按下,n为1左键,2中键,3右键 <ButtonRelease-n> ...

  3. 带阴影的圆形 QLabel

    带阴影的圆形 Label 来自: 公孙二狗

  4. [UOJ#276][清华集训2016]汽水[分数规划+点分治]

    题意 给定一棵 \(n\) 个点的树,给定 \(k\) ,求 \(|\frac{\sum w(路径长度)}{t(路径边数)}-k|\)的最小值. \(n\leq 5\times 10^5,k\leq ...

  5. 行级安全(Row-Level Security)

    通过授予和拒绝(Grant/Deny)命令控制用户的权限,只能控制用户对数据库对象的访问权限,这意味着,用户访问的粒度是对象整体,可以是一个数据表,或视图等,用户要么能够访问数据库对象,要么没有权限访 ...

  6. C#_添加xml文件

    引用:System.Xml; XmlDocument doc = new XmlDocument(); XmlElement Root = doc.CreateElement("Root&q ...

  7. Unity角色对话

    对话类------------------------------------------------------------------------------------------------- ...

  8. 现已告别五险一金?迎来社保商保时代保险INSURAUNCE

    现已告别五险一金?迎来社保商保时代保险INSURAUNCE 经济工作会议提出,中国要降低社会保险费,研究精简归并"五险一金",可以说是为社保变革指明了大方向.未来,生育保险将与基本 ...

  9. oracle创建用户和角色、管理授权以及表空间操作

    show user 显示当前用户connect username/password@datebasename as sysdba 切换用户和数据库 和用户身份 Oracle登录身份有三种: norma ...

  10. 《Pro SQL Server Internals, 2nd edition》的CHAPTER 2 Tables and Indexes中的Clustered Indexes一节(翻译)

    <Pro SQL Server Internals> 作者: Dmitri Korotkevitch 出版社: Apress出版年: 2016-12-29页数: 804定价: USD 59 ...