type
प्रोसेस और सिस्टम
इस्तेमाल
type [-a] <name>शेल से ही पूछता है कि कोई नाम असल में क्या है — alias, function, builtin या फ़ाइल — यही वह चीज़ है जो केवल PATH देखने वाला `which` नहीं देख पाता।
आम विकल्प
| विकल्प | अर्थ |
|---|---|
| -a | Every meaning of the name, in the order the shell would consider them. |
| -t | One word only: alias, keyword, function, builtin or file. |
| -P | Force a PATH lookup even if the name is also an alias or function (bash). |
| -f | Ignore shell functions. |
उदाहरण
type -a lsReveals the alias first and the /bin/ls binary second.
type -t rmPrints "file" if nothing is shadowing it, "alias" if something is.
क्या चल रहा है और क्या मशीन खा रहा है। मारने से पहले पहचानना क्रम है।
कैसे पढ़ें
- बड़े कोष्ठक [ ] उस हिस्से को दिखाते हैं जिसे छोड़ा जा सकता है।
- तीन बिंदु … का मतलब है एक से ज़्यादा दिए जा सकते हैं।
- विकल्पों में बड़े-छोटे अक्षर मायने रखते हैं — कुछ कमांड में -r और -R अलग काम करते हैं।
आम सवाल
Q. type क्या करता है?
शेल से ही पूछता है कि कोई नाम असल में क्या है — alias, function, builtin या फ़ाइल — यही वह चीज़ है जो केवल PATH देखने वाला `which` नहीं देख पाता।
Q. इसे कैसे लिखें?
type [-a] <name> — बड़े कोष्ठक वह हिस्सा दिखाते हैं जो छोड़ा जा सकता है।
Q. कितने विकल्प जानने लायक़ हैं?
यहाँ 4 दिए हैं; पूरी सूची man type में है। यह कमांड प्रोसेस और सिस्टम में आती है।
मिलती-जुलती कमांड
man पेज: man type