sh [Bash Synstax&Commands] #shell #bash #run

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh [Bash Synstax&Commands] #shell #bash #run相关的知识,希望对你有一定的参考价值。

# Installl wget (only curl on new mac) with brew
brew install wget

# Downloading options
## wget
### wget [OPTION]... [URL]...
wget http://www-us.apache.org/dist/tomcat/tomcat-8/v8.5.9/bin/apache-tomcat-8.5.9.tar.gz

## curl
### curl [options] [URL...]
curl -O http://www-us.apache.org/dist/tomcat/tomcat-8/v8.5.9/bin/apache-tomcat-8.5.9.tar.gz

Inccluded are the following:

1. Syntax
2. Files
3. Internet
4. Process
5. Help
6. Rights
# get files
ls

# get files incl rights
ls -l

# get all files incl hidden
ls -a

# get dirs and subdirs
ls -R

## current directors
pwd

## up or down dir
cd dirname
cd ..

## go to home
cd ~
cd $home

# ln
# alias
#OS X has long offered aliases, which let you create links to files, folders, and applications elsewhere in the system without having to duplicate them
ln -s file1/folder2 file2/folder2
# manual
# like vim, quit :q
man cp



# killall
# kill dock procs
killall dock


# defaults
#This command is often used in Terminal tips and tricks to tweak applications and system settings via their preference files. 
defaults
# see rights of files
ls -l

# see chmod rights
# todo

# perform task as admin
sudo task...


chflags
# change flags on file

chmod
# change rights on file

以上是关于sh [Bash Synstax&Commands] #shell #bash #run的主要内容,如果未能解决你的问题,请参考以下文章

bd------bash编程--引用&命令替换

sh Longform-git-branch-tracking-commands.sh

linux bash 后台运行脚本三种方法:&nohupsetsid

在列上使用 bash comm 命令但返回整行

linux bash 后台运行脚本三种方法:&nohupsetsid

更新正在运行的 bash 文件