man: 查看命令说明export: 显示所有的环境变量
echo $VARIABLE_NAME获取某个变量的详细信息echo $HOME,/Users/<your-username>printenv, 打印环境变量
echo:echo Hello Worldorecho -ne "Hello\nWorld\n"echo $SHELL
whereis系统自动构建的数据库来搜索可执行文件,源文件和手册页面。which它在环境变量 PATH 指定的目录中搜索可执行文件。此命令将打印可执行文件的完整路径。clear清除窗口上的内容。sudo: allows a permitted user to execute a command as the superuser or another userpwd: 当前工作目录ls: 列出您的文件ls -a: 列出所有文件,包括隐藏文件ls -l: 列出“长格式”的文件ls **/*orls *.js
cd: 切换目录mkdir:创建 foldercp: 拷贝(Copy)1
2cp source <.|target>
cp -r src_folder <.|target>mv: 移动文件或重命名1
2
3
4
5
6
7
8
9
10
11
12
13# 将目录/usr/men中的所有文件移到当前目录(用.表示)中:
mv /usr/men/* .
# 移动文件
mv file_1.txt /home/office/
# 移动多个文件
mv file_2.txt file_3.txt file_4.txt /home/office/
mv *.txt /home/office/
# 移动目录
mv directory_1/ /home/office/
# 重命名文件或目录
mv file_1.txt file_2.txt
# 重命名目录
mv directory_1/ directory_2/where: 查找引用where ruby
ps: process status.ps auxwget:
wget 是 linux 上的命令行的下载工具。这是一个 GPL 许可证下的自由软件。wget 支持 HTTP 和 FTP 协议,支持代理服务器和断点续传功能,能够自动递归远程主机的目录,找到合乎条件的文件并将其下载到本地硬盘上;如果必要,wget 将恰当地转换页面中的超级连接以在本地生成可浏览的镜像。由于没有交互式界面,wget 可在后台运行,截获并忽略 HANGUP 信号,因此在用户推出登录以后,仍可继续运行。通常,wget 用于成批量地下载 Internet 网站上的文件,或制作远程网站的镜像。- install:
brew install wget, about Homebrew wget https://github.wdf.sap.corp/Entitlement/ems-ui-app-entl-mgmt/blob/master/webapp/Component.jswget -d http://192.168.1.168下载 192.168.1.168 首页并且显示下载信息wget -q http://192.168.1.168下载 192.168.1.168 首页并且不显示下载信息wget -i filelist.txt批量下载wget -c http://example.com/really-big-file.iso断点续传wget -b后台下载
- install:
IP and Mac
1
2
3
4
5
6
7
8
9
10which ifconfig
/sbin/ifconfig
ifconfig | grep 192.168
ifconfig en0 | grep inet | grep -v inet6 | cut -d ' ' -f2
10.130.227.38
host 10.130.227.38
38.227.130.10.in-addr.arpa domain name pointer C02VR4LUHTD8.dhcp.ctul.sap.corp.Copy the contents of the file
id_rsa.pubto the clipboard:1
pbcopy < ~/.ssh/id_rsa.pub
cat /proc/versionkernel versioncat /proc/meminfofree and used memory in the systemcat /proc/cpuinfocpu/hardware information
Linux Command Line
感谢支持,让我安静的做蚂蚁梦!