php 修改文件属性命令行,Linux_linux中如何通过命令修改文件属性,ls -l即可查看目录信息-rw - phpStudy...

linux中如何通过命令修改文件属性

ls -l即可查看目录信息

-rwxr-xr-x 1 xura xura 1753786 2010-05-09 09:54 Grad

分别对应的是:

文件属性 连接数 文件拥有者 所属群组 文件大小 文件修改时间 文件名

例如:

d   rwx   r-x  r-x

第一个字符指定了文件类型。在通常意义上,一个目录也是一个文件。如果第一个字符是横线,表示是一个非目录的文件。如果是d,表示是一个目录。第二段是文件拥有者的属性,第三段是文件所属群组的属性,第四段是对于其它用户的属性。

三个命令:

(1)chmod----->修改文件权限

(2)chgrp------>修改文件或目录所属组

语法:chgrp [选项] group filename?

该命令改变指定指定文件所属的用户组。其中group可以是用户组ID,也可以是/etc/group文件中用户组的组名。文件名是以空格分开的要改变属组的文件列表,支持通配符。如果用户不是该文件的属主或超级用户,则不能改变该文件的组。

参数:

- R 递归式地改变指定目录及其下的所有子目录和文件的属组。

例1:$ chgrp - R book /opt/local /book

改变/opt/local /book/及其子目录下的所有文件的属组为book。

(3)chown ------->更改某个文件或目录的属主和属组

eg:#chown -R xura ubuntu9.04------>将ubuntu9.04目录的用户改为xura

语法:chown [选项] 用户或组 文件

说明:chown将指定文件的拥有者改为指定的用户或组。用户可以是用户名或用户ID。组可以是组名或组ID。文件是以空格分开的要改变权限的文件列表,支持通配符。

参数:

- R 递归式地改变指定目录及其下的所有子目录和文件的拥有者。

- v 显示chown命令所做的工作。

例1:把文件shiyan.c的所有者改为wang。

$ chown wang shiyan.c

例2:把目录/his及其下的所有文件和子目录的属主改成wang,属组改成users。

$ chown - R wang.users /his相关阅读:

innerText innerHTML的用法以及注意事项 [推荐]

win 2003 server的一些优化设置

PHP开发中常用的三个表单验证函数使用小结

JSP多种web应用服务器导致JSP源码泄漏漏洞

Linux系统中确保访问三级域名畅通的方法

用正则表达式判断字符串是汉字还是拼音的js函数代码

JS解析XML的实现代码

CSS教程:绝对定位和浮动的分栏布局

通过下拉框的值来确定输入框是否可以为空的代码

javaScript 判断字符串是否为数字的简单方法

奥汀管理员不切换bat脚本 V1.0-Design by Adobo

PHP6的核心是对Unicode的内置支持

网页制作与CSS的UTF-8和GB2312编码问题

巧用Linux 架设TFTP Server备份路由器的配置文件

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/441324.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【 HDU - 1796】How many integers can you find (容斥原理,二进制枚举或者dfs)

题干: Now you get a number N, and a M-integers set, you should find out how many integers which are small than N, that they can divided exactly by any integers in the set. For example, N12, and M-integer set is {2,3}, so there is another set {2,…

aix解锁oracle用户,aix用户被锁定的解决办法

原/etc/security/lastlog文件:oracle:time_last_login 1212750668tty_last_login /dev/pts/2host_last_login 10.126.10.200unsuccessful_login_count 18time_last_unsuccessful_login 1212750699tty_last_unsuccessful_login /dev/pts/2host_last_unsuccessf…

【CodeForces - 205B 】Little Elephant and Sorting (思维)

题干: The Little Elephant loves sortings. He has an array a consisting of n integers. Lets number the array elements from 1 to n, then the i-th element will be denoted as ai. The Little Elephant can make one move to choose an arbitrary pair of…

oracle外键有什么用,深入理解Oracle索引(20):外键是否应该加索引

先表明我的立场、我是绝对支持外键一定要加索引!虽然在高版本的Oracle里、对这个要求有所降低、但依然有如下原因:① 死锁外键未加索引是导致死锁的最主要原因、因为无论更新父表主键、或者删除一个父表记录、都会在子表加一个表锁这就会不必要的锁定更多…

【CodeForces - 1027B 】Numbers on the Chessboard (没有营养的找规律题,无聊题)

题干: You are given a chessboard of size nnnn. It is filled with numbers from 11 to n2n2 in the following way: the first ⌈n22⌉⌈n22⌉ numbers from 11 to ⌈n22⌉⌈n22⌉ are written in the cells with even sum of coordinates from left to right f…

php mysql int 日期格式化 string,MYSQL int类型字段的时间存放和显示 和 php的时间存放函数...

mysql:int类型字段的时间存放UPDATE tablename SET add_time UNIX_TIMESTAMP(NOW())int类型字段的时间显示SELECT FROM_UNIXTIME(add_time) FROM tablenamephp时间戳函数:time() 获取当前时间戳 结果:1232553600strtotime() 转换为时间戳da…

【CodeForces - 1060C】Maximum Subrectangle (思维,预处理前缀和,dp,枚举长度)

题干: You are given two arrays aa and bb of positive integers, with length nn and mmrespectively. Let cc be an nmnm matrix, where ci,jai⋅bjci,jai⋅bj. You need to find a subrectangle of the matrix cc such that the sum of its elements is at m…

oracle按照指定顺序读取,oracle按照指定顺序进行排序

之前在网上查了下按照指定顺序进行排序的方法,根据charindex来处理排序,但是在oracle发现不行,因为oracle没有charindex函数,然后使用instr代替了charindex,然后又在网上搜了另外一种方实验如下:1.新建表CR…

【Codeforces 631C 】Report(单调栈,思维模拟)

题干: Each month Blake gets the report containing main economic indicators of the company "Blake Technologies". There are n commodities produced by the company. For each of them there is exactly one integer in the final report, that d…

oracle开放视图,Oracle视图

Oracle视图在Oracle中,视图是实际上并不存在的虚拟表。它存储在Oracle数据字典中,不存储任何数据。可以在调用时执行。通过连接一个或多个表的查询创建视图。Oracle创建视图句法:参数:view_name:它指定要创建的Oracle …

【CodeForces - 214C 】Game (拓扑排序,思维)

题干: Furik and Rubik love playing computer games. Furik has recently found a new game that greatly interested Rubik. The game consists of n parts and to complete each part a player may probably need to complete some other ones. We know that th…

php$this-conn可以不先定义吗,CodeIgniter 是不是支持PDO 查询?还是本来就不支持

CodeIgniter 是否支持PDO 查询?还是本来就不支持?本帖最后由 default7 于 2014-11-15 19:34:55 编辑配置CodeIgniter 的database 连接方式为PDO 类型,但是怎么都查询不到数据,却可以查处有多少记录!自带代码仔细跟踪代…

【ZOJ - 2836 】Number Puzzle (容斥原理)

题干: Given a list of integers (A1, A2, ..., An), and a positive integer M, please find the number of positive integers that are not greater than M and dividable by any integer from the given list. Input The input contains several test cases. …

轮番滑动PHP,touch事件之滑动判断(左右上下方向)

touch事件之滑动判断(左右上下方向)作者: 2020.03.11 本文发布于18天前 分类:$("body").on("touchstart", function(e) {// 判断默认行为是否可以被禁用if (e.cancelable) {// 判断默认行为是否已经被禁用if (!e.defaultPrevented) {e.preventDefault();}}…

【CodeForces - 215A】Bicycle Chain (水题)

题干: Vasyas bicycle chain drive consists of two parts: n stars are attached to the pedal axle, m stars are attached to the rear wheel axle. The chain helps to rotate the rear wheel by transmitting the pedal rotation. We know that the i-th sta…

ubuntu 在线安装php,ubuntu在线安装LNMP

一直以来个人安装lamp环境都是源码编译的,这个过程呢其实也要去经历的,但是毕竟占用时间久,有些时候在做一些测试环境的时候,可以在线安装比较快源码编译nginx可看往期:Nginx的安装对于lnmp的在线安装,如下…

【CodeForces - 215B 】Olympic Medal (数学,公式推导)

题干&#xff1a; The World Programming Olympics Medal is a metal disk, consisting of two parts: the first part is a ring with outer radius of r1 cm, inner radius of r2 cm, (0 < r2 < r1)made of metal with density p1 g/cm3. The second part is an i…

oracle的分支语句,oracle中的分支与循环语句

分支语句 if的三种写法一, if 2 < 1 thendbms_output.put_line(‘条件成立‘);end if;二, if 2 < 1 thendbms_output.put_line(‘条件成立‘);elsedbms_output.put_line(‘条件不成立‘);end if;三, if 2 < 1 thendbms_output.put_line(‘条件成立‘);elsif 4 > 3 …

【CodeForces - 215C 】Crosses (思维,图形题)

题干&#xff1a; There is a board with a grid consisting of n rows and m columns, the rows are numbered from 1 from top to bottom and the columns are numbered from 1 from left to right. In this grid we will denote the cell that lies on row number i and co…

Scaffold php,GitHub - yiiplus/scaffold: scaffold是一个基于Yii2高级项目模版工程化实现的应用程序...

Yii 2 Scaffold Project Kit易加-脚手架(scaffold)是一个基于Yii2高级项目模版工程化实现的应用程序&#xff0c;它将更加高效、规范和工程化的满足项目开发的需求。DIRECTORY STRUCTUREcommonconfig/ contains shared configurationsmail/ contains view files for e-mailsmod…