Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì(Áù) L2CAP±à³ÌʵÀý

ÀýÒ»£º·¢ËÍ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ÏÂÉú²úÕßÏû·ÑÕßµÄʵÏÖ

 #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include <semaphore.h>
#define M 10 // »º³åÊýÄ¿
int in = 0;   // Éú²úÕß·ÅÖòúÆ·µÄλÖÃ
int out = 0; // Ïû·ÑÕßÈ¡²úÆ·µÄλÖÃ
int buff[M] = {0}; // »º³å³õʼ»¯Îª0£¬ ¿ªÊ¼Ê±Ã ......

LinuxϵÄDhcp°²×°(·þÎñÆ÷ÃûDHcpd)

 
Ò» °²×°DHCP·þÎñÆ÷
1.ÏȲ鿴ϵͳÊÇ·ñ°²×°DHcp
#rpm -qa|grep dhcp
2.°²×°RPM°ü,Èç¹ûÊÇRea Hat LInux9°²×°°üÔÚµÚ¶þÕ¹âÅÌ,¹ÒÔÚÁ˹âÇýºó¿ÉÓòéÕÒÃüÁîÕÒDHCP°ü
#find /mnt/cdrom/ -name "dhcp"
3.²é¿´findÃüÁîËѳöÀ´µÄÎļþ·¾¶½øÐа²×°
#rpm -ivh/mnt/cdrom/RedHat/RPMS/dhcp*/dhcpd*(¸ù¾Ý×Ô¼ºÊµ¼ÊÎļþ·¾¶)
4. ......

Linux¹Ø»úÃüÁîÏê½â

 ÔÚlinuxÏÂһЩ³£ÓõĹػú/ÖØÆôÃüÁîÓÐshutdown¡¢halt¡¢reboot¡¢¼°init£¬ËüÃǶ¼
¿ÉÒÔ´ïµ½ÖØÆôϵͳµÄÄ¿µÄ£¬µ«Ã¿¸öÃüÁîµÄÄÚ²¿¹¤×÷¹ý³ÌÊDz»Í¬µÄ£¬Í¨¹ý±¾ÎĵĽéÉÜ£¬Ï£
ÍûÄã¿ÉÒÔ¸ü¼ÓÁé»îµÄÔËÓø÷ÖֹػúÃüÁî¡£
¡¡¡¡ 1.shutdown
   shutdownÃüÁȫµØ½«ÏµÍ³¹Ø»ú¡£ ÓÐЩÓû§»áʹÓÃÖ±½Ó¶Ïµôµç ......

ͼ½â£ºÈçºÎÔÚLINUXÖа²×°VM

ʹÓÃVM°²×°ÐéÄâϵͳ£¬ÕæµÄºÜ·½±ã¡£¿ÉÒÔÈøöÈËÇáËÉÓµÓÐÒ»¸öÍøÂ磬²¢°üº¬ÓкܶàÖÐϵͳ¡£
Òò´Ë£¬ÈçºÎÈÃÕâЩϵͳֱ½ÓÏíÓÃÔ­À´ÏµÍ³ÉϵÄÎļþ¾ÍÏԵúÜÖØÒªÁË¡£¡£
ÕâÀï¾ÍÊǽ²Í¨¹ý°²×°VM-ToolsÀ´ÊµÏÖÐéÄâϵͳÓëԭϵͳ֮¼äµÄÎļþ¹²ÏíµÄ¡£
1.ÔËÐÐVM£¬Æô¶¯ÄãµÄÐéÄâLINUXϵͳ¡£
2.Çл»µ½Ô­ÏµÍ³£¬Ñ¡ÔñVMÖеÄVM²Ëµ¥----Install VMWare ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ