Cheat কী?
Cheat হলো পাইথন-ভিত্তিক একটি কমান্ড লাইন টুল যা সিস্টেম অ্যাডমিনদের চিট শিট (কমando রেফারেন্স) ভিউ এবং সেভ করতে দেয়। এটি কমांडের সিম্পল টেক্সট উদাহরণ দেখায় যাতে অপশন, আর্গুমেন্ট বা সাধারণ ব্যবহার মনে থাকে। "যে কমান্ডগুলো আপনি ঘন ঘন ব্যবহার করেন কিন্তু মনে রাখতে পারেন না" - সেগুলোর জন্য চিট।
ইন্সটলেশন
# সিস্টেম আপডেট $ sudo apt-get update && sudo apt-get upgrade # pip ইন্সটল $ sudo apt-get install python3-pip # cheat ইন্সটল $ sudo pip3 install cheat
ভার্সন যাচাই
$ cheat -v cheat 2.1.24
টেক্সট এডিটর সেট করা
# ডিফল্ট এডিটর সেট (vim/nano) $ export EDITOR=/usr/bin/vim # পরমানেন্ট করতে .bashrc-এ যোগ করুন $ echo 'export EDITOR=/usr/bin/vim' >> ~/.bashrc $ source ~/.bashrc
চিট ব্যবহার
কমান্ডের চিট শিট দেখুন
$ cheat tail
# To show the last 10 lines of file tail file # To show the last N lines of file tail -n N file # To show the last lines of file starting with the Nth tail -n +N file # To show the last N bytes of file tail -c N file # To show the last 10 lines of file and wait for file to grow tail -f file
সব চিট শিট লিস্ট দেখুন
$ cheat -l
নতুন চিট শিট তৈরি/এডিট
$ cheat -e mysheet
চিট শিট সার্চ
$ cheat -s tail