fuser

प्रोसेस और सिस्टम

इस्तेमाल

fuser <file> | fuser <port>/tcp

पता लगाता है — और कहें तो मार देता है — कि कोई फ़ाइल, माउंट या पोर्ट कौन इस्तेमाल कर रहा है; `-k` SIGKILL भेजता है, सफ़ाई का मौका नहीं देता, और यह केवल Linux (psmisc) में है क्योंकि macOS संस्करण में सिर्फ़ `-cfu` हैं।

आम विकल्प

विकल्पअर्थ
3000/tcpPIDs using that TCP port (Linux).
-kKill those processes. Sends SIGKILL, so no cleanup. Linux only; macOS fuser has no -k.
-iAsk before each kill, and only useful together with -k.
-vA readable table with user, PID and access type.
-m <mount>Every process using anything on that filesystem, before you unmount it.
-c / -f / -uThe only options POSIX guarantees, and all that macOS supports.

उदाहरण

fuser 3000/tcp

Which PID is holding the port (Linux).

fuser -k -i 3000/tcp

Kill the holder, asking first (Linux).

fuser -vm /mnt/data

Find out why the filesystem says "device is busy".

क्या चल रहा है और क्या मशीन खा रहा है। मारने से पहले पहचानना क्रम है।

कैसे पढ़ें

  • बड़े कोष्ठक [ ] उस हिस्से को दिखाते हैं जिसे छोड़ा जा सकता है।
  • तीन बिंदु … का मतलब है एक से ज़्यादा दिए जा सकते हैं।
  • विकल्पों में बड़े-छोटे अक्षर मायने रखते हैं — कुछ कमांड में -r और -R अलग काम करते हैं।

आम सवाल

Q. fuser क्या करता है?

पता लगाता है — और कहें तो मार देता है — कि कोई फ़ाइल, माउंट या पोर्ट कौन इस्तेमाल कर रहा है; `-k` SIGKILL भेजता है, सफ़ाई का मौका नहीं देता, और यह केवल Linux (psmisc) में है क्योंकि macOS संस्करण में सिर्फ़ `-cfu` हैं।

Q. इसे कैसे लिखें?

fuser <file> | fuser <port>/tcp — बड़े कोष्ठक वह हिस्सा दिखाते हैं जो छोड़ा जा सकता है।

Q. कितने विकल्प जानने लायक़ हैं?

यहाँ 6 दिए हैं; पूरी सूची man fuser में है। यह कमांड प्रोसेस और सिस्टम में आती है।

मिलती-जुलती कमांड

man पेज: man fuser