alias

Linux 系统安装[Redhat]2

匿名 (未验证) 提交于 2019-12-02 21:59:42
1.1. 配置网络 echo "nameserver 8.8.8.8" >>/etc/resolv.conf ping www.baidu.com 1.2. Alias配置 alias rm=‘rm -f‘ alias ...=‘cd ../..‘ alias ....=‘cd ../../../‘ alias egrep=‘egrep --color=auto‘ alias grep=‘grep --color=auto‘ alias l.=‘ls -d .* --color=auto‘ alias ll=‘ls -l --color=auto‘ alias ls=‘ls --color=auto‘ alias l=‘ls -AlF‘ #自定义回收站功能 myrm(){ D=/tmp/$(date +%Y%m%d%H%M%S); mkdir -p $D; mv "$@" $D && echo "moved to $D ok"; } alias rm=‘myrm‘ 1.3. 配置yum源 cd /etc/yum.repos.d wget http://mirrors.163.com/.help/CentOS6-Base-163.repo sed -i ‘s/$releasever/6/g‘ CentOS6-Base-163.repo chmod 644 CentOS6-Base

Linux添加alias简化命令

匿名 (未验证) 提交于 2019-12-02 21:56:30
一、简介 linux alias 是命令的一种别称,输入 alias 可以看到像下面这样的结果: alias vi="vim" 也即,输入vi后,被自动定向到vim这个命令了。alias的作用就是,可以简写命令。 二、修改alias 若要添加自己的alias,格式如下 alias la="ls -al --color=auto" 三、修改配置文件 上述命令,在用户登出后就无效了,可以用修改配置文件的办法,使每次都能够自动生效。 若要修改用户(而非全部用户)自己的alias,可以修改~/.bashrc文件 vii ~/.bashrc 再最后面加上你自己定义的alias,如 alias la="ls -al --color=auto" 这个修改,要下次登录的时候才能生效。想要即刻生效,可以输入 source ~/.bashrc 四、常用的alias 这个根据个人爱好了,可以google之~找到你自己喜欢的alias PS: 修改全局的alias可以修改系统配置文件,我这里就不说了。 还有其他的方面知识,如交互式、非交互式登录的配置文件,这个也不多说了。 文章来源: Linux添加alias简化命令

Bytom JAVA SDK使用指南

匿名 (未验证) 提交于 2019-12-02 21:53:52
最近在开源社区协助比原链完成了 java sdk,这里跟大家分享下哈。 Bytom Java SDK This SDK contains methods for easily interacting with the Bytom API. Below are examples to get you started. For more information, please see Bytom API reference documentation at https://github.com/Bytom/bytom/wiki SDK 比较容易接入,以下是其中一个例子,更多的例子请查看 https://github.com/Bytom/bytom/wiki There are various ways to install and use this sdk. We’ll elaborate on a couple here. Note that the Bytom JAVA SDK requires JAVA 7 or newer. 有多种方式可以安装Bytom JAVA SDK,例举如下,注意SDK需要Java 7版本及更高版本。 Maven 在Maven配置文件中添加如下配置: < dependency > < groupId > io.bytom </ groupId > <

使用keytool工具产生带根CA和二级CA的用户证书

匿名 (未验证) 提交于 2019-12-02 21:35:18
keystore 则会使用默认在用户Home目录下的 .keystore 秘钥库(如果没有则会创建),输入秘钥库的密码,填写根证书的信息,最后填写根证书秘钥对的密码。 keytool -genkeypair -alias rootca -keyalg RSA rootca : keytool 的导出功能,从秘钥库中导出根证书,输入秘钥库的密码,导出的证书文件为 rootca.cer 命令如下: keytool -exportcert -alias rootca -file rootca.cer keytool 生成二级CA的证书,但是此时的证书还是张自签证书,我们需要从中生成一个二级CA的证书请求(包含了公钥),然后通过将证书请求到 rootca 签发我们的二级证书,然后我们在将 rootca 签发的二级CA证书导入到导出证书请求的秘钥库中,完成二级CA的生成。下面是生成二级CA证书命令,此时是张自签证书: keytool -genkeypair -alias subca -keyalg RSA subca ,如下图所示: keypair 中导出证书请求,下面是导出证书请求(带公钥)的命令, subca 是我们上面生成的二级CA的秘钥对名字,最终导出证书请求文件为 subca.csr : keytool -certreq -alias subca -file subca.csr

SSH Config File Alias To Get To a Directory On Server [closed]

夙愿已清 提交于 2019-12-02 20:45:11
I have a shortcut in my SSH Config file and it works great, but what I want to do is have different Aliases jump to different directories on the server. so if I type ssh domain1 It connects and will automatically cd into domain1's directory. Is there a way to do that? Something like Host dev1 Hostname example.com User myname Dir domains/domain1/ Host dev2 Hostname example.com User myname Dir domains/domain2/ Jay In this post on ServerFault , they say you can't do it all through the ssh config file. But you can do it with the ssh config and your .bash_profile or whatever the terminal nerds call

executing shell script without calling sh implicitly

我们两清 提交于 2019-12-02 20:18:32
I was wondering if it is possible to make a "link" in usr/bin (i.e.) that leads to a shell-script. But I want just to write % shellscript instead of % sh shellscript.sh kinda like an alias. Is this possible? Make the first line of the script #!/bin/sh Then make it executable by typing the command: chmod +x shellscript.sh If you now place the script in a bin folder that is on your system's PATH variable and you will be able to run it directly. To see the folders in your path, type: echo $PATH I usually use /home/[my username]/bin for scripts that I have written so that they don't interfere with

Dynamically assign alias to all the field names in msyql query

余生颓废 提交于 2019-12-02 20:14:10
问题 I have 2 tables in mysll DB. Both tables have few fixed and few dynamic columns (Fields / Schema). I want to join both these tables with following query: SELECT * FROM `cd` cd LEFT JOIN cd_n cn ON cd.id = cn.fk_cd And I want to result as CD_Column1 CD_Column1 CD_Column3 ...... CN_Column1 CN_Column2 CN_Column3 ..... value value value ...... value value value ... value value value ...... value value value ... Where ..... is dynamic column names of both the tables. So the case is I dont know the

Git alias returns an error when using pipe command

别等时光非礼了梦想. 提交于 2019-12-02 19:24:26
问题 I'm using git-ftp and I'm trying to execute awk to only include the first lines: git ftp show | awk 'NR<7' It works perfect in terminal. However executing it as an alias returns an error. This is how my git config file looks like: [alias] sh = ftp show | awk 'NR<7' If I run git sh it returns: fatal: Unrecognised option: awk I also tried just using show, but it also returns an error: [alias] sh = show | awk 'NR<7' fatal: ambiguous argument '|': unknown revision or path not in the working tree.

Cadence Allegro快捷键设置教程——随心应手,画图神速!秒变高手

梦想与她 提交于 2019-12-02 19:10:00
作为功能如此强大的操作类画图软件,快捷键设置怎么能少呢。小时候玩个小霸王还要矫情的设置个自己的按键。 Allegro 在这方面也是非常强大友好的。有多种方式进行个性化设置。 比如:Skill的应用,快捷键的设置,Stroke的应用,脚本文件的应用,菜单命令的加载等。 今天我就主要跟大家讲解一下快捷键的设置。当然,皮皮我主要是授之以渔,以后自己需要什么都可以自己设置。不管是带新人,跟人讲解问题,皮皮的一向观点还是以真正学会为目的。所以,不要直接问我要文件哦。 我也会贴出来一些常用的命令,你可以模仿着设置,自己多设置几次,设着设着就会了。而且,自己设置的都会用的上。 我的ENV文件都好几米长,都是数十年用下来,各种地方搬过来,自己设置修改的。但是,真正自己能用的也就那几毫米的几个常用功能吧。下面就来具体讲讲怎么用吧! 快捷键的类型: 一般分为执行命令功能和在命令中执行选项的功能。这种解释是皮皮自己非官方的解释。下面举个栗子, 比如你想设置一个拉线的功能,正常你需要点击下图这个图标,然后进行拉线命令下选项选择,最后进行拉线操作。 然鹅,我们使用这么高频的功能,怎么能忍受这样点来点去。岂不是加速鼠标手的恶化,关键是影响效率啊。 所以,我们就迫切的需要键盘鼠标多进程的并行操作。所以就可以如下操作。 设置拉线命令: alias Insert add connect

linux基础命令篇二

被刻印的时光 ゝ 提交于 2019-12-02 19:01:29
1.rmdir删除空目录 [root@andy ~]# ls anaconda-ks.cfg [root@andy ~]# mkdir test [root@andy ~]# ls anaconda-ks.cfg test [root@andy ~]# rmdir test [root@andy ~]# ls anaconda-ks.cfg [root@andy ~]# 2.cat查看文件内容(最少) cat -n显示多少行 [root@andy ~]# ls anaconda-ks.cfg [root@andy ~]# touch test [root@andy ~]# echo "hello" >> test [root@andy ~]# cat test hello [root@andy ~]# cat -n test 1 hello [root@andy ~]# echo -e "hello\nhello" >> test [root@andy ~]# cat -n test 1 hello 2 hello 3 hello 3.more查看文件(更多内容以百分比显示查看进度)不能向后移动,q退出查看 4.less可以随意浏览文件(较少) 5.head查看前10行 [root@andy zabbix]# head zabbix_agentd.conf # This is a