Linux Cookbook 3
Files And Dirs
1. touch ---create a new, empty file
vi filename is also ok
2. mkdir ---make directory
mkdir -p ---to make all directories in the path
3. space in filename
use '' or "" or \
ls 'top secret'
ls "top secret"
ls top\ secret
4. cd ---change the current working dir
1)cd ---To make your home directory the current working directory
2)cd - ---Changing to the Last Directory You Visited
3)pwd ---Getting the Name of the Current Directory
5. ls ---Listing Directories
ls --color ---Listing Directories in Color
Some of the default color settings include displaying directory names in blue,
text files in white, executable files in green, and links in turquoise.
Many systems are set up to use this flag by default, so that using ls
&nbs
Ïà¹ØÎĵµ£º
Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâÆª·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´Ë×ªÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨ÕâÆª²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......
×î½ü¼¸Ì죬ÐèÒª´î½¨ÐµĿª·¢»·¾³£¬Êý¾Ý±¸·ÝÎļþ32G,ÐèÒªÒÆÖ²µ½ÆäËülinux·þÎñÆ÷ÉÏ¡£ ¿ÉÒÔ²ÉÓÃÈçϵÄÃüÁî´«ÊäÎļþ¡£
1¡¢ scp Óû§Ãû@IP:Îļþ·¾¶ ±¾µØÂ·¾¶¡££¨ÐèÒª¸ù¾ÝÌáʾÊäÈëÃÜÂ룩
ÀýÈ磺
scp test@10.10.10.10:/mnt/sbap1210.dmp /data/sbap/myoraclebak
2¡¢echo mget -c Òª´«Êäµ ......
linuxÏ»ñÈ¡±¾»úIPµØÖ·
·½·¨Ò»£º
local_host="`hostname --fqdn`"
local_ip=`host $local_host | awk '{print $NF}'`
·½·¨¶þ£º
/sbin/ifconfig |grep -Eo '\baddr:[^ \t]+' |grep -Eo '[0-9\.]+' |head -n1
......
½¨Á¢linuxÁ½Óû§Ö®¼äµÄÐÅÈιØÏµ
×ªÔØ×Ô http://www.cnblogs.com/starspace/archive/2008/10/30/1323235.html
ÓÐaºÍbÁ½Ì¨»úÆ÷£¬ÏÖÒª½«a»úÆ÷µÄuser1Óû§Ìí¼Óµ½b»úÆ÷µÄuser2Óû§ÐÅÈÎÁбíÀʹa»úÆ÷µÄuser1Óû§¿ÉÒÔÖ±½Ósshµ½b»úÆ÷µÄuser2Óû§
²½Ö裺
1£¬½øÈëa»úÆ÷/home/user ......
ÓÃlinux C ϵĺ¯Êýµ÷Óô´½¨ÖÐÎÄĿ¼¡¢ÎļþµÈ£¬×Ö·û´®µÄ±àÂë¸ñʽҪÇóÊÇutf-8¸ñʽµÄ¡£
±ÈÈçÏëҪʹÓà int mkdir(const char *pathname, mode_t mode); ´´½¨Ò»¸öÖÐÎĵÄĿ¼¡£ÄÇôpathnameµÄ±àÂë¸ñʽҪÇóÊÇutf-8µÄ£¬¶ø²»ÄÜÊÇgb3212/gbkµÄ£¬·ñÔò¾ÍÊÇÂÒÂë¡£
ÄÇôÈç¹ûlinux CÏÂÈçºÎ½øÐÐgbk<---->utf-8±àÂëת»»µÄ±àÂë×°»»µÄ ......