易截截图软件、单文件、免安装、纯绿色、仅160KB

linux ls只是列出文件夹

ls -l|grep ^d    ----列出当前目录下的文件夹
ls -l|grep ^d|grep "tmp"  ----列出当前目录下明子含有"tmp"的文件夹
for dir in `ls -l ~/dxy/|grep ^d | awk '{print $9}'`  ---- awk '{print $9}' ,只print 文件夹的名字
do
echo "==== $dir"
cd ~/dxy;cd $dir/
t=`ls -l|grep ^d|grep "tmp"|wc -l`
echo t =: $t
done


相关文档:

linux 系统下使用C程序实现时钟的函数

#include "stdio.h"
#include "math.h"
#include "time.h"
#define INTERVAL 1  定义宏的时间间隔为1秒
//
void On_Time()  //每一秒激发的事件
{
   printf("now=%s\n","JJK"); 
}
void Timer()  //时钟的函数
{  time_t newclk,oldclk;
   while(1)
 &nb ......

Linux c的popen()

进程I/O函数,与pclose函数一起使用。
表头文件
  #include <stdio.h>
函数定义
  FILE * popen
( const char * command
, const char * type
);
  int pclose
( FILE * stream
);
函数说明
  
popen() 函数通过创建一个管道,调用 fork 产生一个子进程,执行一个 shell 以运行命令来开启一 ......

linux文件类型

linux中,通过
ls -al
显示的属性中,第一个就标志文件类型。通常有一下几种情况:
[ - ]----普通文件
[ d]----目录
[ l ]----连接文件
[ b]----块设备
[ c ]----字符设备
[ s ]----套结字
[ p ]----管道 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号