只是简单记录我使用的命令,没有什么参考价值,我只是用于整理
chown
chmod permissions filename
Where,
permissions
can be read, write, execute or a combination of them.filename
is the name of the file for which the permissions need to change. This parameter can also be a list if files to change permissions in bulkWe can change permissions using two modes:
- Symbolic mode: this method uses symbols like
u
,g
,o
to represent users, groups, and others. Permissions are represented asr, w, x
for read write and execute, respectively. You can modify permissions using +, - and =.- Absolute mode: this method represents permissions as 3-digit octal numbers ranging from 0-7.
How to Change Permissions using Symbolic Mode
The table below summarize the user representation:
USER REPRESENTATION DESCRIPTION u user/owner g group o other We can use mathematical operators to add, remove, and assign permissions. The table below shows the summary:
OPERATOR DESCRIPTION + Adds a permission to a file or directory – Removes the permission = Sets the permission if not present before. Also overrides the permissions if set earlier. Example:
Suppose, I have a script and I want to make it executable for owner of the file
zaira
.Current file permissions are as follows:
Let's split the permissions like this:
df -H
The output of df -H will report how much space is used, available, percentage used, and the mount point of every disk attached to your system
Ubuntu 查看磁盘空间大小命令 - 水木清扬 - 博客园
Steps to Git clone on Ubuntu
git-clone@ubuntu:~$ sudo apt install git git-clone@ubuntu:~$ git --version git-clone@ubuntu:~$ git clone https://gitlab.com/cameronmcnz/gitlab-made-easy.git git-clone@ubuntu:~$ cd my-github-repo git-clone@ubuntu:~$ git config --global user.email "ubuntu-clone@example.com" git-clone@ubuntu:~$ git config --global user.name "cameronmcnz" git-clone@ubuntu:~$ touch my-file.html git-clone@ubuntu:~$ git add . git-clone@ubuntu:~$ git commit -m "good commit message" git-clone@ubuntu:~$ git push origin master
how to create pr open a TXT file
sudo gedit 文件名
error:sudo: gedit: command not found