LoginSignup
0
0

More than 5 years have passed since last update.

find 特定ディレクトリ以下の uid,gid の数値のペアがどんなものがあるか探す

Last updated at Posted at 2017-02-09

概要

特定のディレクトリ以下の、uidとgidの数値のペアでどんなものがあるか調べたい

結論

/tmp/ いかを調べたいときはこんな感じ

find /tmp/ -exec ls -lnd {} \; | \
 awk  '{print $3,$4;}' |  sort | uniq

1行にすると

find /tmp/ -exec ls -lnd {} \; | awk  '{print $3,$4;}' |  sort | uniq

数字でなくて、名前にしたいならば ls のオプションを変更して n をはずす

find /tmp/ -exec ls -ld {} \; | \
 awk  '{print $3,$4;}' |  sort | uniq

1行にすると

find /tmp/ -exec ls -ld {} \; | awk  '{print $3,$4;}' |  sort | uniq

そもそも

あるディレクトリ以下の uid と gid を変更する必要があったが
全部同じ uid, gid でかきかえてよいのかを確認したかった

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0