看到一句命令如下, 意思是将docker容器中的日志输出并且只输出包含”GENERATED”的行,突然发现对2>&1这个写法还不是很了解,于是查了资料大概了解下。 文件操作符以及重定向符号 在unix或者linux系统中,有3种文件操作符(File Descriptor ) ame Short Name File Descriptor Number Description Standard In stdin 0 Keyboard Input Standard Out stdout 1 Console Output Standard Error stderr 2 Console Error Output 这里只讨论1和2, 1表示标准输出,2表示标准错误输出, 2>&1 中的 > 则是重定向符号。 执行以下命令将something(可以是一个文本文件,也可以是其他类型文件)的内容重定向到result.txt文件中: cat something > result.txt 以上命令实际是 cat something 1> result.txt 的缩写,即省略了表示标准输出的1。 那么我们如果执行以下命令,cat一个不存在的文件,并将结果重定向到result.txt文件,会出现什么情况呢? cat something_not_exist > result.txt 结果是终端显示错误信息: […]
Category: Software & Tools
minikube minikube is local Kubernetes, focusing on making it easy to learn and develop for Kubernetes. All you need is Docker (or similarly compatible) container or a Virtual Machine environment, and Kubernetes is a single command away: minikube start To install the latest minikube stable release on x86-64 Linux using binary download: Dashboard minikube has integrated support for the Kubernetes Dashboard UI. The […]
移除文本中的备注和空行 获取文本文件source_file的内容、移除其中的备注和空行,并将剩余内容保存到new_file中 cat source_file |grep -v “^#” |grep -v “^$” > new_file
Running MyBatis Generator With Maven MyBatis Generator (MBG) includes a Maven plugin for integration into a maven build. In keeping with Maven’s configuration by convention strategy, including MBG in a Maven build can be very simple. The minimum configuration is shown below: <project …> … <build> … <plugins> … <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.4.0</version> </plugin> … […]
Nacos 简介: Nacos/nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称;一个更易于构 建云原生应用的动态服务发现、配置管理和服务管理平台。 官网: https://nacos.io/ 仓库:https://github.com/alibaba/nacos 转载自阿里云开发者社区主要是记录发音,以前都读错了。。 Maven Maven 3.3.1+ requires JDK 1.7+. Maven 3.3.1+ requires JDK 1.7+. Please set appropriate JDK at Settings | Build, Execution, Deployment | Build Tools | Maven | Runner | JRE