Linux?????ls?????????
???????????? ???????[ 2014/10/13 10:23:02 ] ?????????????? Linux
?????????????д???????show()?????????????????????????
????show??????????£?
1 void show(char name[][CNT]?? int cnt)
2 {
3 int index;
4 char mode[10];
5 char *str;
6 struct stat buf;
7 for(index = 0; index < cnt; index ++)
8 {
9 memset(&buf?? 0?? sizeof(buf));
10 if(stat(name[index]?? &buf) == -1)
11 {
12 printf("stat error!! ");
13 exit(1);
14 }
15 mode_to_char(buf.st_mode?? mode);
16 str = ctime(&buf.st_atime);
17 str = time_change(str);
18 int i;
19 for(i = strlen(name[index]) - 1; name[index][i] != '/'; i --);
20 i++;
21 printf("%10s.%2d %5s %5s%5d%13s %s "?? mode?? buf.st_nlink?? getpwuid(buf.st_uid)->pw_name?? getgrgid(buf.st_gid)->gr_name?? buf.st_size?? str?? name[index] + i);
22 }
23 }
??????????????:
????getpwuid()?????????????????????????????????y????е????????——pw_name???????getgrid()??????????????
???????????????:
1 #include "head.h"
2 int main(int argc?? char *argv[])
3 {
4 DIR *fp;
5 char name[CNT][CNT];
6 int cnt;
7 fp = opendir(argv[1]);
8 if(fp == NULL)
9 {
10 printf("opendir error!! ");
11 exit(1);
12 }
13 cnt = file_name(fp?? argv[1]?? name);
14 str_sort(name?? cnt);
15 show(name?? cnt);
16 return 0;
17 }
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Linux??????DDR????????????Linux?????????????????豸??????????linux???в???????????м??????????????????????????Linux????Linux??DNS????????????γ???????????Linux?????????????Linux????(???)????????Linux ????????????????????????????????Windows???У?Linux???????Linux????????????????Linux iommu??vfio???????Linux????ε???TCP???????Linux?????????????СLinux?·???????????Linux???Jexus?й?Asp.Net Core??ó???Linux?????????Щ??
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????