cheat sheet for linux and unix
A small Linux cheat sheet, introducing the very basic and very essential commands for surviving at the Linux CLI.
Moving around in the file system
Command
Action
pwd
"Print working directory" - show what dir you're in.
ls
List the contents of a dir.
ls -l
List the contents of a dir and show additional info of the files.
ls -a
List all files, including hidden files.
cd
Change directory.
cd ..
Go to the parent directory.
Examining files
Command
Action
file
Determine the type of a file.
cat
Concatenate a file.
less
View text files and paginate them if needed.
Manipulating files and directories
Command
Action
cp
Copy a file.
cp -i
Copy a file and ask before overwriting.
cp -r
Copy a directory with its contents.
mv
Move or rename a file.
mv -i
Move or rename a file and ask before overwriting.
rm
Remove a file.
rm -r
Remove a directory with its contents.
rm -i
Ask before removing a file. Good to use with the -r option.
mkdir
Make a directory.
rmdir
Remove an empty directory.
rpm command cheat sheet for Linux
rpm is a powerful Package Manager for Red Hat, Suse and Fedora Linux. It can be used to build, install, query, verify, update, and remove/erase individual software packages. A Package consists of an archive of files, and package information, including name, version, and description:
Syntax
Description
Example(s)
rpm -ivh {rpm-file}
Install the package
rpm -ivh mozilla-mail-1.7.5-17.i586.rpm
rpm -ivh --test mozilla-mail-1.7.5-17.i586.rpm
rpm -Uvh {rpm-file}
Upgrade package
rpm -Uvh mozilla-mail-1.7.6-12.i586.rpm
rpm -Uvh --test mozilla-mail-1.7.6-12.i586.rpm
rpm -ev {package}
Erase/remove/ an installed package
rpm -ev mozilla-mail
rpm -ev --nodeps {package}
Erase/remove/ an installed package without checking for dependencies
rpm -ev --nodeps mozilla-mail
rpm -qa
Display list all installed packages
rpm -qa
rpm -qa | less
rpm -qi {package}
Display installed information along with package version and
Ïà¹ØÎĵµ£º
ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......
LinuxÏÂmysqlµÄ°²×°²½Ö裨·Çrpm°²×°£©
1 ÏÂÔØmysql-standard-5.0.27-linux-i686-glibc23.tar.gz °ü
2 ½âѹµ½°²×°Ä¿Â¼£º tar -zxvf /edass/db/mysql-standard-5.0.27-linux-i686-glibc23.tar.gz
3 ½« mysql-standard-5.0.27-linux-i686-glibc23Á´½Óµ½mysql : ln –s mysql-standard-5.0.27-linux-i686 ......
±³¾°£ºÔÚÊÖ»úwap³ÌÐò¹¤×÷ÔÚlinuxÏ£¬Ðèͨ¹ýwindows´úÀí·þÎñÆ÷ÉÏÍø£¨http/https£©£¬ISA´úÀí¡£Ê¹ÓôúÀíÐèÒªÓòÃû\Óû§ÃûºÍÃÜÂë¡£
1¡¢ÏÈÖ´ÐÐÃüÁîÉèÖû·¾³±äÁ¿export http_proxy=http://192.168.24.254:8080/ºÍexport http_proxy=http://sywgdev.net\proteinx@192.168.24.254:8080/¡£µ«Ö´ÐÐʧ°Ü¡£±¨407´í£¬ÈÏ֤ʧ°Ü¡£
2¡ ......
1
¡¢°²×°Ç°µÄ×¼±¸
1.1
¼ì²éÓ²¼þ
ÎïÀíÄڴ棺
# grep
MemTotal /proc/meminfo
½»»»¿Õ¼ä£º
# grep
SwapTotal /proc/meminfo
½»»»¿Õ¼äµÄ´óСÊǸù¾ÝÎïÀíÄÚ´æµÄ´óСÀ´ÉèÖõģ¬ÎïÀíÄÚ´æÉÙÓÚ
2G
µÄÔò½»»»¿Õ¼äÉèΪÎïÀíÄÚ´æµÄÁ½±¶£¬ÎïÀíÄÚ´æ´óÓÚ
2G
µÄÔò½»»»¿Õ¼äºÍÎïÀíÄÚ´æ´óСһÑù¡£Èç¹û²»·ûºÏÉÏÊö¹æ¶¨£¬ÄÇô¾ÍÐèÒª ......