ps कमांड
ps एक class roll call जैसा है जो हर currently running program को list करता है, हर एक की अपनी ID number के साथ, ताकि आपको पता हो कि आपके computer पर कौन चल रहा है।
In this page:
Syntax
ps [options]
ps -p process_id
ps Command
ps currently running processes को list करता है, process ID (PID), status, और उन्हें start करने वाले command जैसी information दिखाते हुए। ps aux एक common invocation है जो detailed columns के साथ सभी users के सभी processes दिखाता है।
यह एक system पर क्या चल रहा है inspect करने का primary tool है।
Note:
एक specific process को नाम से ढूंढने के लिए
ps aux को grep में pipe करें, जैसे ps aux | grep myscript।उदाहरण: The ps Command
#!/bin/bash
echo "Current shell's PID: $$"
ps -p $$
Login to try C/C++/Java/PHP code in the editor
Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the
view already swaps in the hi_ translation fields (or blanks these
out if untranslated), so this renders correctly for both languages
without a lang_code check here. #}
आम गलतियां
ps aux | grep nameउपयोग करना औरgrepprocess को खुद match करना।- यह भूल जाना कि
psoptions systems के बीच अलग हैं। - Scripts में default
psoutput parse करना, जबps -o pid,commstable columns देता है।
🔒
Chapter Quiz — Complete all 12 topics to unlock
0/12 topics done
Complete these topics first: