Linux

Linux cshrc文件作用

Linux如何起进程/查看进程/杀进程

Linux 文件755 代表什么权限

Linux辅助线程

Linux进程间通信方法

  pipeline,msgq...

  进程间通信_百度百科

    http://baike.baidu.com/link?url=tLNXNQvG5Wo6NptnjkflYaUQbdqW5fC3n40Cv4iF4YSX5EzgfJgwIbZnAfpXLVV1QRvP1293Dgo9qRBmSVfME_

Linux基本命令

  • Linux 命令大全 | 菜鸟教程

    • http://www.runoob.com/linux/linux-command-manual.html

Linux监控命令,监测IO

Shell

What is $*?
  Will display all the commandline arguments that are passed to the script

What is the difference between a shell variable that is exported and the one that is not exported?
  export LANG=C
  will make the variable LANG the global variable, put it into the global environment. all other processes can use it.
  LANG=C
  will change the value only in the current script.

How will you list only the empty lines in a file (using grep)?
  grep "^[ ]*$" filename.txt
  In character set (between [ and ] one space and tab is given)
  this command will gives all the blank line including those having space and tabs (if pressed)only

How do you read arguments in a shell program - $1, $2 ?
  #!/bin/sh
  for i in $*
  do
  echo $i
  done
  On executig the above script with any number of command-line arguments it will display all the parametsrs.

How would you get the character positions 10-20 from a text file?
  cut -c10-20 <filename.txt>
  or
  cat filename.txt | cut -c 10-20

用脚本实现:两个文件有多列,在指定列中找相匹配串。

精心汇总的 24 道 shell 脚本面试题 - 程序员大咖

  • https://mp.weixin.qq.com/s/elYuWwwiYR2XzP2K3qDeNQ
  • https://linux.cn/article-5311-1.html
  • Q:1 Shell脚本是什么、它是必需的吗?
  • Q:2 什么是默认登录shell,如何改变指定用户的登录shell
  • Q:3 可以在shell脚本中使用哪些类型的变量?
  • Q:4 如何将标准输出和错误输出同时重定向到同一位置?
  • Q:5 shell脚本中“if”语法如何嵌套?
  • Q:6 shell脚本中“$?”标记的用途是什么?
  • Q:7 在shell脚本中如何比较两个数字 ?
  • Q:8 shell脚本中break命令的作用 ?
  • Q:9 shell脚本中continue命令的作用 ?
  • Q:10 告诉我shell脚本中Case语句的语法 ?
  • Q:11 shell脚本中while循环语法 ?
  • Q:12 如何使脚本可执行 ?
  • Q:13 “#!/bin/bash”的作用 ?
  • Q:14 shell脚本中for循环语法 ?
  • Q:15 如何调试shell脚本 ?
  • Q:16 shell脚本如何比较字符串?
  • Q:17 Bourne shell(bash) 中有哪些特殊的变量 ?
  • Q:18 在shell脚本中,如何测试文件 ?
  • Q:19 在shell脚本中,如何写入注释 ?
  • Q:20 如何让 shell 就脚本得到来自终端的输入?
  • Q:21 如何取消变量或取消变量赋值 ?
  • Q:22 如何执行算术运算 ?
  • Q:23 do-while语句的基本格式 ?
  • Q:24 在shell脚本如何定义函数呢 ?

面试总结之Linux/Shell的更多相关文章

  1. 阿里Linux Shell脚本面试25个经典问答

    转载: 阿里Linux Shell脚本面试25个经典问答 Q:1 Shell脚本是什么.它是必需的吗? 答:一个Shell脚本是一个文本文件,包含一个或多个命令.作为系统管理员,我们经常需要使用多个命 ...

  2. linux shell 中的sleep命令

    开始还以为是这样的语法: sleep(1), 后面发现是: linux shell 中的sleep命令 分类: LINUX 在有的shell(比如linux中的bash)中sleep还支持睡眠(分,小 ...

  3. Linux shell脚本编程(三)

    Linux shell脚本编程 流程控制: 循环语句:for,while,until while循环: while CONDITION; do 循环体 done 进入条件:当CONDITION为“真” ...

  4. Linux shell脚本编程(二)

    Linux shell脚本编程(二) 练习:求100以内所有偶数之和; 使用至少三种方法实现; 示例1: #!/bin/bash # declare -i sum=0 #声明一个变量求和,初始值为0 ...

  5. Linux shell脚本编程(一)

    Linux shell脚本编程: 守护进程,服务进程:启动?开机时自动启动: 交互式进程:shell应用程序 广义:GUI,CLI GUI: CLI: 词法分析:命令,选项,参数 内建命令: 外部命令 ...

  6. Linux Shell 流程控制语句

    * 本文主要介绍一些Linux Shell 常用的流程控制语句* 1. if 条件语句:if-then/if-elif-fi/if- else-fi if [条件判断逻辑1];then command ...

  7. Linux Shell 截取字符串

    Linux Shell 截取字符串 shell中截取字符串的方法很多 ${var#*/} ${var##*/} ${var%/*} ${var%%/*} ${var:start:len} ${var: ...

  8. Linux Shell 重定向与管道【转帖】

    by 程默 在了解重定向之前,我们先来看看linux 的文件描述符. linux文件描述符:可以理解为linux跟踪打开文件,而分配的一个数字,这个数字有点类似c语言操作文件时候的句柄,通过句柄就可以 ...

  9. Linux Shell 通配符、元字符、转义符【转帖】

    作者:程默 说到shell通配符(wildcard),大家在使用时候会经常用到.下面是一个实例: 1   1 2 3 4 [chengmo@localhost ~/shell]$ ls a.txt  ...

随机推荐

  1. JDK 1.8 ConcurrentHashMap 源码剖析

    转载两篇不错的文章: 第一篇: 前言 HashMap是我们平时开发过程中用的比较多的集合,但它是非线程安全的,在涉及到多线程并发的情况,进行put操作有可能会引起死循环,导致CPU利用率接近100%. ...

  2. Android下拉刷新控件--PullToRefresh的简单使用

    Android中很多时候都会用到上下拉刷新,这是一个很常用的功能,Android的v4包中也为我们提供了一种原生的下拉刷新控件--SwipeRefreshLayout,可以用它实现一个简洁的刷新效果, ...

  3. c++ 重设容器的长度(resize)

    #include <iostream> #include <vector> using namespace std; int main () { vector<int&g ...

  4. DB.使用Oracle时的遇到的问题

    1.(20190225)ojdbc14.jar 来自“E:\ZC_DB\_Connector\Oracle\10g\Oracle Database 10g Release 2 (10.2.0.4) J ...

  5. spark streaming 使用geoIP解析IP

    1.首先将GEOIP放到服务器上,如,/opt/db/geo/GeoLite2-City.mmdb 2.新建scala sbt工程,测试是否可以顺利解析 import java.io.Fileimpo ...

  6. JavaScript--变量和运算符

    JavaScript--变量和运算符 一.心得 JavaScript语法:变量声明 var弱类型 var中可以是任何类型在JavaScript里面,单&单|是位运算符.变量没有值使用的话就是u ...

  7. Linux 最好是禁用IPV6

    看着不爽, 还容易出事. 编辑文件 – /etc/sysctl.conf $ sudo gedit /etc/sysctl.conf 在文件的最后加入下面的行. # IPv6 disabled net ...

  8. css3伪放大镜(图片放大动画)效果(鼠标移入圆形区域放大图片)

    源码: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8&q ...

  9. n人围圈报数,报3出圈

    题目:有n个人围成一圈,顺序排号.从第一个人开始报数(从1到3报数),凡报到3的人退出圈子,问最后留下的是原来第几号的那位. Scanner scanner = new Scanner(System. ...

  10. find ... -exec ... {} \; 的解释

    find的特殊功能是能够进行额外的动作,如上图的 find / -type f -name "test.txt" -exec rm {} \;命令 1) {} 代表的是由find找 ...