linux - 如何创建存档并对其进行 chmod

标签 linux

我应该在这个文件中创建一个文件存档。当我创建它时,我 应使用 chmod 以便存档应具有 757 权限。

我这样做了但失败了,这是对还是错? :

$ mkdir file1
$ cd file1
# here i should create an archive but how i dont know
$ chmod 757 archivename

最佳答案

首先使用触摸命令:

bash-4.3$ mkdir a                                                                                                                                                                                                            
bash-4.3$ cd a                                                                                                                                                                                                               
bash-4.3$ pwd                                                                                                                                                                                                                
/home/cg/root/a                                                                                                                                                                                                              
bash-4.3$ touch a.txt                                                                                                                                                                                                        
bash-4.3$ chmod 757 a.txt                                                                                                                                                                                                    
bash-4.3$ ls -lrt                                                                                                                                                                                                            
total 0                                                                                                                                                                                                                      
-rwxr-xrwx 1 18207 18207 0 May  4 11:29 a.txt

关于linux - 如何创建存档并对其进行 chmod,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37026338/

相关文章:

linux 从头开始​​ : Can't do make menuconfig for linux installing

linux - 如何在 logrotate.conf 中重启服务

linux - Apache服务器在ubuntu上无法上线

c - 非阻塞读永不返回

c - 为什么第一次显示777

linux -/proc/$pid/maps 显示在 x86_64 linux 上没有 rwx 权限的页面

linux - 在Go中挂接系统调用

linux - shell 脚本: Redirect output of program to changing files

Linux 驱动程序。仅读取 IOCTL 命令有效

linux - 外面无法连接Tomcat9