Linux Ubuntu Commands
Summary: Linux Ubuntu commands for changing file permissions and extracting different archives efficiently.
Created Jul 1, 2021 - Last updated: Jul 1, 2021
docs
how-to
Linux Ubuntu Commands
Created: September 12, 2024 1:48 PM Labels & Language: Linux Ubuntu, Shell
Description
Linux Ubuntu Commands
chmod Method
# chmod Method in Ubuntu
sudo chmod -R 600 ××× (只有所有者有读和写的权限)
sudo chmod 644 ××× (所有者有读和写的权限,组用户只有读的权限)
sudo chmod 700 ××× (只有所有者有读和写以及执行的权限)
sudo chmod 666 ××× (每个人都有读和写的权限)
sudo chmod 777 ××× (每个人都有读和写以及执行的权限)
Extract files
The extract
command is not a specific command in Linux Ubuntu. However, if you are referring to extracting files from an archive, you can use different commands depending on the type of archive:
.tar
archive: Use thetar
command with thex
flag followed by the name of the archive file. For example:tar -xvf file.tar
will extract the contents offile.tar
to the current directory..tar.gz
or.tgz
archive: Use thetar
command with thexz
flags followed by the name of the archive file. For example:tar -xvzf file.tar.gz
will extract the contents offile.tar.gz
to the current directory..zip
archive: Use theunzip
command followed by the name of the archive file. For example:unzip file.zip
will extract the contents offile.zip
to the current directory..rar
archive: Use theunrar
command followed by the name of the archive file. For example:unrar x file.rar
will extract the contents offile.rar
to the current directory.
Note that these commands may require additional options or flags depending on the specific archive file. You can refer to the manual pages (man
) for each command for more information.