उपयोगी 1-लाइन shell commands
(muhammadraza.me)$ ps aux | convert label:@- process.png
→ shell output को image में बदलें
$ curl ipinfo.io
→ external IP address
$ git log --format='%aN' | sort -u
→ contributors देखें
$ history | awk '{print $2}' | sort | uniq -c | sort -rn | head.
→ सबसे ज़्यादा इस्तेमाल होने वाले commands देखें, और alias में जोड़ सकते हैं
$ ls -d */
→ सिर्फ directories देखें
$ du -hs */ | sort -hr | head
→ मौजूदा folder के अंदर सबसे बड़े 10 folders देखें
$ ss -p
→ network इस्तेमाल कर रहे apps की list देखें
$ rm -f !(test.txt).
→ एक खास file को छोड़कर बाकी सब delete करें
$ python3 -m http.server
→ मौजूदा folder में web server चलाएँ
$ mkfifo hello; script -f hello
→ terminal session को real time में साझा करें
4 टिप्पणियां
चलिए fzf (https://github.com/junegunn/fzf) का उपयोग करें.
लगता है कि HTTP Static server की ज़रूरत काफ़ी बार पड़ती है.
अगर यह production service के लिए हो, तो Apache या nginx इस्तेमाल करेंगे, इसलिए शायद वह बात नहीं है. क्या यह system administrators के काम की चीज़ है?
जब डेवलपमेंट मशीन पर output files (HTML, CSS, JS, WASM, ...) को आसानी से टेस्ट करना होता है, तो मेरे लिए इससे बेहतर कोई टूल नहीं है।
इसी के साथ मैं कभी-कभी npx serve भी इस्तेमाल करता हूँ
The Art of Command Line [अनुवाद] https://hi.news.hada.io/topic?id=137
उपयोगी Zsh टिप्स https://hi.news.hada.io/topic?id=3764
आजकल उपयोगी command line tools का संग्रह https://hi.news.hada.io/topic?id=793
एक-लाइन HTTP Static Server संग्रह https://hi.news.hada.io/topic?id=1325
.vimrcफ़ाइल में ज़रूर डालने वाली 5 लाइनें https://hi.news.hada.io/topic?id=3397