Linux账户体系

bash shell界面下输入"ll",显示当前目录的所属账户权限信息。

chmod更改账户权限,chown更改目录所属账户。

账户对特定目录的权限标识:

ls -al
得到如下列表:
drwxr-xr-x   4 oracle dba       4096 May 20 11:47 oralog1
drwxr-x---  18 root   root      4096 May 20 13:51 root

解释:
d :第一位表示文件类型,d是目录文件、l是链接文件、-是普通文件、p是管道

rwx :第2-4位表示这个文件的属主拥有的权限。r是读、w是写、x是执行

r-x :第5-7位表示和这个文件属主所在同一个组的用户所具有的权限

r-x :第8-10位表示其他用户所具有的权限
比如:
drwxr-xr-x   4 oracle dba       4096 May 20 11:47 oralog1

表示oralog1是个目录,oracle拥有读写执行的权限,和oracle所在同一个dba组里的用户拥有只读和执行权限,剩下其他用户拥有只读和执行权限!

Linux Bash Shell(Script)

Basic Concepts

  1. Pipe
    Represented by symbol: "|", pipe directs the stdout of the last command to the stdin of the next command.
    Example (directs the result of find command to grep command):
    find ./src/* | grep .java

  2. Environmental Variable
    export ABC=$(find ./src/* | grep .java)

Arguments in Bash Commands

Arguments in bash commands are all considered as string value. However, double quotations is optional and often omitted. Essentially, bash variables are character strings but arithmetic operations is allowed through "let" tool.

Stat

stat -x abc.txt