LinuxϱéÀúijÎļþ¼ÐÏÂÎļþ£¨²»µü´ú½øÈë×ÓĿ¼£©
ÔÎĵØÖ·£ºhttp://www.wangzhongyuan.com/archives/487.html
ÒÔÏÂÊÇÒ»¸öLinux/UnixÏÂÏÔʾijһĿ¼ÏÂÎļþÁбíµÄC³ÌÐò£¬Ï൱ÓÚ×î»ù±¾µÄlsÃüÁîµÄ¹¦ÄÜ£¬ÏÔʾµÄÄÚÈݱ¨¸æ¸ÃĿ¼ÏµÄ×ÓĿ¼ÒÔ¼°ÎļþÃû:
#include <sys/types.h>
#include <dirent.h>
#include <stdio.h>
#include <errno.h>
int main(int argc,char *argv[])
{
DIR *dp;
struct dirent *dirp;
int n=0;
if (argc!=2)
{
printf("a single argument is required\n");
exit(0);
}
if((dp=opendir(argv[1]))==NULL)
printf("can't open %s",argv[1]);
while (((dirp=readdir(dp))!=NULL) && (n<=50))
{
if (n % 1 == 0) printf("\n");
n++;
printf("%10s ",dirp->d_name);
}
printf("\n");
closedir(dp);
exit(0);
}
Èç¹ûÖ»ÊÇÏÔʾ¸ÃĿ¼ÏµÄ×ÓĿ¼Ãû£¬ÔòÐèҪʹÓÃÈçϳÌÐò£¨ÆäÖл¹°üÀ¨ÁËÒ»¸ö¶ÔÓÚ×ÓĿ¼ÃûµÄðÅÝÅÅÐò£©£º
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <stdio.h>
#include <errno.h>
int main(int argc,char *argv[])
{
DIR *dp;
struct dirent *dirp;
struct stat buf;
char tempDirName[100];
char dirNames[100][100];
int n=0,i=0,j=0,dirCount=0;
if (argc!=2)
{
printf("a single argument is required\n");
exit(0);
}
strcat(tempDirName,argv[1]);//get the directory name
if((dp=opendir(argv[1]))==NULL)
printf("can't open %s",argv[1]);
while (((dirp=readdir(dp))!=NULL) && (n<=50))
{
//if (n % 1 == 0) printf("\n");
n++;
//printf("%10s ",dirp->d_name);
strcpy(tempDirName,"");//clear
strcat(tempDirName,argv[1]);//get the directory name
strcat(tempDirName,dirp->d_name);
if(IsDirectory(tempDirName))
{
//printf("\tDirectory!!!!");
strcpy(dirNames[dirCount],dirp->d_name);
//printf("\
Ïà¹ØÎĵµ£º
1. HCI²ãÐÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI) ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈÐÒé ......
2¡¢APACHEµÄ°²×°
1£©µ±È»»¹ÊÇÏÂÔØÔ´Âë°ü£¬È磺httpd-2.0.55.tar.gz£¬µØÖ·×Ô¼ºÕÒ……
2£©½âѹËõ£¬>tar -zxvf httpd-2.0.55.tar.gz
3£©½øÈë½âѹºóµÄhttpd-2.0.55£¬>cd httpd-2.0.55
4£©°²×°ÅäÖã¬>./configure --prefix=/opt/apache --enable-cgi
5£©±àÒ룬>make
6£©°²×°£¬>make install
......
3¡¢PHP°²×°
1£©»¹ÊÇÏÂÔØÔ´Âë°ü£¬È磺php-5.1.1.tar.gz£¬ÏÂÔصØÖ·£ºhttp://www.php.net
2£©½âѹËõ£¬>tar -zxvf php-5.1.1.tar.gz
3£©½øÈëphp-5.1.1£¬>cd php-5.1.1
4£©°²×°ÅäÖã¬>./configure --prefix=/opt/php
--with-apxs2=/opt/apache/bin/apxs --with-mysql=/opt/mysql
--with-mysqli=/opt/mysql/bin/ ......
1¡¢ÏÂÔØphpMyAdminÖÁweb·þÎñÆ÷Ŀ¼²¢ÖØÃüÃûΪ£ºphpmyadmin¡£¼ÙÉè·þÎñÆ÷Ŀ¼Ϊwww£¬Ôò´æ·ÅλÖÃΪwww/phpmyadmin£¬·ÃÎÊ·¾¶Îªhttp://localhost/phpmyadmin
2¡¢¸´ÖÆ"/phpmyadmin/libraries/"Ŀ¼ÏµÄ"config.default.php"ÎļþÖÁ"/phpmyadmin/"Ŀ¼Ï£¬²¢ÖØÃüÃûΪ"config.inc.php"
3 ......
Ubuntu9.10 ¾ÙÀý£¨ÒòΪËü·½±ã£¬N¶à¶«Î÷Ò»Ö±½ÓÔÚÏß°²×°£¬Ê¡µÃ±àÒëÁË£©£¬ÆäËûlinux»ù±¾Ïàͬ£¨²»Í¬µÄ¾ÍÊÇÓÐЩҪ½øÐÐÔ´Âë°²×°£¬µ«Óõ½µÄÈí¼þÊÇÒ»ÑùµÄ£©£¬Õû¸ö°²×°ÎÒÒÔ¾×ö³É½Å±¾·Å·½±ãÏÂÔØ°²×°
°²×°ies4linuxÖв¿·Ö²Î¿¼×Ô£ºhttp://hi.baidu.com/unknown379/blog/item/df70c3ef54742d31adafd506.html
Éæ¼°µÄÈí¼þ
1¡¢wine£¬ÊÇÒ ......