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:
.tararchive: Use thetarcommand with thexflag followed by the name of the archive file. For example:tar -xvf file.tarwill extract the contents offile.tarto the current directory..tar.gzor.tgzarchive: Use thetarcommand with thexzflags followed by the name of the archive file. For example:tar -xvzf file.tar.gzwill extract the contents offile.tar.gzto the current directory..ziparchive: Use theunzipcommand followed by the name of the archive file. For example:unzip file.zipwill extract the contents offile.zipto the current directory..rararchive: Use theunrarcommand followed by the name of the archive file. For example:unrar x file.rarwill extract the contents offile.rarto 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.