简体   繁体   中英

Chown command usage in perl script

我在Perl脚本的下面一行中找不到有关-1使用的任何信息。

chown -1, $group, $directory

perldoc -f chown :

chown LIST

Changes the owner (and group) of a list of files. The first two elements of the list must be the numeric uid and gid, in that order. A value of -1 in either position is interpreted by most systems to leave that value unchanged . Returns the number of files successfully changed.

 my $cnt = chown $uid, $gid, 'foo', 'bar'; chown $uid, $gid, @filenames; 

...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM