No.1ベストアンサー
- 回答日時:
rootでしか実行出来ませんがlsof(8)はどうですかね?
以下のlsofのオンラインマニュアルの抜粋にある通り、lsofを実行し出力のFDの項目を見ればロックされているかどうかが分かります。
------8<-------8<------8<-------8<-------8<------
FD is followed by one of these characters, describing the
mode under which the file is open:
r for read access;
w for write access;
u for read and write access;
space if mode unknown and no lock character follows;
`-' if mode unknown and lock character follows.
The mode character is followed by one of these lock characters, describing the type of lock applied to the file:
N for a Solaris NFS lock of unknown type;
r for read lock on part of the file;
R for a read lock on the entire file;
w for a write lock on part of the file;
W for a write lock on the entire file;
u for a read and write lock of any length;
U for a lock of unknown type;
x for an SCO OpenServer Xenix lock on part of the file;
X for an SCO OpenServer Xenix lock on the entire file;
space if there is no lock.
------8<-------8<------8<-------8<-------8<------
以下、Fedora CORE 3での実行例です。
(たぶん、見難いとは思いますが。。。)
------8<-------8<------8<-------8<-------8<------
# lsof | egrep " [0-9]*[rwu\-][NrRwWuUxX] "
nifd 3563 root 4uW REG 253,0 5 1080653 /var/run/nifd.pid
mDNSRespo 3593 nobody 10uW REG 253,0 5 1080655 /var/run/mDNSResponder.pid
sendmail 3793 root 5wW REG 253,0 33 1080751 /var/run/sendmail.pid
sendmail 3801 smmsp 4wW REG 253,0 50 1084009 /var/run/sm-client.pid
anacron 3905 root 4uW REG 253,0 9 1084745 /var/spool/anacron/cron.daily
anacron 3905 root 5uW REG 253,0 0 1084747 /var/spool/anacron/cron.monthly
atd 3914 root 3uW REG 253,0 5 1084699 /var/run/atd.pid
gconfd-2 4562 lean 12wW REG 253,0 649 214373 /tmp/gconfd-lean/lock/0t1112092337ut33437u500p4562r2059905881k3220550124 (deleted)
------8<-------8<------8<-------8<-------8<------
お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!
似たような質問が見つかりました
- Android(アンドロイド) Googleのファミリーリンクの危険性に気付いてしまったのですが、皆さんの感想を教えてください! 2 2023/05/09 10:01
- 格安スマホ・SIMフリースマホ SIMロックについて 3 2022/07/17 09:45
- docomo(ドコモ) SIMロック、またはSIMロック解除の仕組みをおしえてください。 5 2022/04/25 10:57
- 格安スマホ・SIMフリースマホ SIMロックの解除に個人情報は必要ですか? フリマアプリで購入したSIM解除してないスマホ端末は購入 6 2022/12/27 00:46
- Android(アンドロイド) スマートフォンを盗まれた場合に備えて 3 2023/07/15 15:14
- Amazon Amazon アカウントはどうすると変更できる? 5 2022/04/10 07:09
- クレジットカード MyJCBアプリのカード情報確認のパスワードを間違えて確認できなくなった 1 2023/06/01 18:38
- その他(Microsoft Office) OneDrive Personalについて 1 2022/08/02 18:25
- 格安スマホ・SIMフリースマホ SIMロック解除 2 2022/07/21 19:18
- iPhone(アイフォーン) iPhone5Cのアクティベーションロック を外す方法 1 2022/04/26 23:06
関連するカテゴリからQ&Aを探す
おすすめ情報
デイリーランキングこのカテゴリの人気デイリーQ&Aランキング
-
スクリプトのエラー「unexpecte...
-
bashでシングルクォート内の変...
-
ロケールをutf8からsjisにする...
-
シェルスクリプト実行で”そのよ...
-
ldapaddコマンドでエラー
-
/usr/local/bin/rubyを実行する...
-
Linux 月を英語表示したい
-
Cシェルのかっこいいプロンプト...
-
/usr のリネーム
-
Dirコマンドでフォルダ内ファイ...
-
TOPコマンドで表示するCPU使用...
-
エクセルの表にヘンな枠が・・・
-
ラズパイで『’test.service’をs...
-
batである文字列内に特定の文字...
-
IPアドレスだとPingが通るのに...
-
pingは正常なのにtracerouteで...
-
Linux環境 grepで改行コード(CR...
-
Ctrl+Zで戻りすぎた場合、逆に...
-
tar.bz2ファイルのインストール...
-
SONYの音楽ソフト「x-アプリ」...
マンスリーランキングこのカテゴリの人気マンスリーQ&Aランキング
-
スクリプトのエラー「unexpecte...
-
bashでシングルクォート内の変...
-
シェルスクリプト実行で”そのよ...
-
Linux 月を英語表示したい
-
自動パスワード入力でscpするス...
-
crontabでsql/plusの起動
-
cronの@rebootでのdateコマンド...
-
Linuxで自作バッチファイルの置...
-
apachectl start command not f...
-
cron設定で正常に動作しない
-
Cronジョブの終了時刻を簡単に...
-
UNIXのbashエラーでnot a valid
-
sudoでシェルスクリプトを実行...
-
crontabでjavaだけが上手く動い...
-
macのターミナルからemacsを開...
-
crontabで実行されない部分があ...
-
Cシェルのかっこいいプロンプト...
-
Linuxでシェルスクリプトがフル...
-
hp-uxで時間(時計)を合...
-
bad interpreterで、シェルが使...
おすすめ情報