Subscribe to How-To Geek सदस्यता के लिए कैसे करने के लिए geek -

Important! This is an automatic machine translated page. If you can read english, you should Click Here to read the original English version of the article.

How to display a list of recent commands in Ubuntu Linux कैसे Ubuntu Linux में हाल की आज्ञाओं की एक सूची प्रदर्शित करने के लिए

Linux has a rich command line experience that can sometimes be a little daunting for people switching over from Windows. लिनक्स एक अमीर कमांड लाइन अनुभव है कि कभी कभी एक विंडोज़ से अधिक स्विचन लोगों के लिए थोड़ा कठिन हो सकता है. Displaying the list of recent commands is pretty simple, though: हाल की आज्ञाओं की सूची प्रदर्शित बहुत आसान है, हालांकि:

> history > इतिहास

1 ps -ef 1 पी एस-एफई
2 kill 24188 2 24,188 मार
3 ps -ef 3 पी एस-एफई
4 tail logfile.log 4 पूंछ logfile.log

If you want to find a command that you used before but you have a huge history list, you can quickly find it by passing it through grep. यदि आप को कोई आदेश है कि तुम पहले करते थे, लेकिन तुम एक विशाल इतिहास सूची है पता चाहता हूँ, तुम जल्दी से इसे यह grep से गुजर से ढूँढ सकते हैं. Let's say we remember typing the ftp command, but can't remember the domain name of the server: हम कहते हैं कि हम एफ़टीपी कमांड टाइप याद है, लेकिन याद रहे सर्वर का डोमेन नाम नहीं कर सकते हैं:

> history | grep ftp > इतिहास | grep एफ़टीपी

321 ftp 321 एफ़टीपी ftp.cdrom18.com ftp.cdrom18.com

Pretty simple stuff! बहुत आसान सामान! What if we want to display the list of items that we use the most often?  We can use a much more complicated command like this: क्या हुआ अगर हम चाहते हैं मदों की सूची में है कि हम सबसे अधिक बार उपयोग प्रदर्शित करने के लिए? हम इस तरह के और अधिक जटिल कमांड का प्रयोग कर सकते हैं:

> history|awk '{print $2}'|awk 'BEGIN {FS=”|”} {print $1}'|sort|uniq -c|sort -r इतिहास | 'awk ($ 2 प्रिंट)' | 'awk BEGIN (FS ="|"}> ($ 1) प्रिंट' | तरह | uniq-c | प्रकार-r

114 ls 114 रास
105 ./runreports.sh 105. / Runreports.sh
97 cd 97 सीडी
24 uptime 24 uptime
15 mysql 15 mysql
13 vi 13 vi

The last command was thanks to पिछले कमान धन्यवाद था Lifehacker Lifehacker , which is a great site you should definitely subscribe to. है, जो एक महान साइट आप निश्चित रूप से की सदस्यता चाहिए.

The techniques used in the last command are useful in other contexts. पिछले कमान में इस्तेमाल तकनीक अन्य संदर्भों में उपयोगी होते हैं. I'll be posting more similar commands going forwards. मैं और इसी तरह आगे जा कमांड पोस्ट होगा.

This article was originally written on 10/4/06 Tagged with: यह आलेख मूल रूप से 10/4/06 टैग पर लिखा था: SysAdmin SysAdmin , , Ubuntu Ubuntu

Daily Email Updates दैनिक ईमेल अपडेट

You can get our how-to articles in your inbox each day for free. आप अपने इनबॉक्स में हमारे कैसे लेख को मुफ्त के लिए प्रत्येक दिन प्राप्त कर सकते हैं. Just enter your name and email below: बस नीचे अपना नाम और ईमेल दर्ज करें:


Name: नाम:
Email: ईमेल:

Comments (1) टिप्पणियाँ (1)

  1. Narayan नारायण

    This is a bash builtin . यह एक पार्टी की योजना बनाई builtin है. man bash and the builtin manual pops up showing history in there. आदमी मार और मैनुअल builtin ऊपर चबूतरे वहाँ में इतिहास को दर्शाता है.
    -N -N


Our Friends हमारे दोस्त
Getting Started प्रारंभ करना


About How-To Geek के बारे में कैसे करने के लिए geek -
What Is That Process? यह प्रक्रिया क्या है?
svchost.exe svchost.exe
jusched.exe jusched.exe
dwm.exe dwm.exe
ctfmon.exe ctfmon.exe
wmpnetwk.exe wmpnetwk.exe
wmpnscfg.exe wmpnscfg.exe
rundll32.exe rundll32.exe
wfcrun32.exe wfcrun32.exe
Ipoint.exe Ipoint.exe
Itype.exe Itype.exe
Wfica32.exe Wfica32.exe
Mobsync.exe Mobsync.exe
conhost.exe conhost.exe
Dpupdchk.exe Dpupdchk.exe Adobe_Updater.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. कॉपीराइट © HowToGeek.com 2006-2009. All Rights Reserved. सर्वाधिकार सुरक्षित.