天亦任我狂
天亦任我狂
关注数: 5
粉丝数: 0
发帖数: 28
关注贴吧数: 0
求助!增加linux隐藏进程的系统调用的办法 实现一个系统调用hide来隐藏进程,使得用户无法使用ps或top命令观察到进程的状态。要求实现以下几个基本功能: (1)实现用户可以使用以下方式调用该系统调用:int hide(pid_t pid,int on),并且在进程pid有效地前提下,如果on置1,进程被隐藏,这时用户无法通过proc文件系统观察到进程状态;如果on置0且此前为隐藏状态,则恢复正常状态。系统调用的返回值请自行设计,但请注意其合理性。 (2)考虑权限问题,只有超级用户才可以使用该系统调用。 (3)在/proc 目录下创建一个文件/proc/hidden,该文件可读可写,它与一个全局量hidden_flag对应,当hidden_flag为0时,所有进程都无法隐藏,即便此前进程被hide系统调用要求隐藏。只有当hidden_flag为1时,此前通过hide调用要求隐藏的进程才可以隐藏起来。
如何用批处理实现UNIX中的命令grep? 小弟刚刚批处理入门.有问题像各位高手请教!如何用批处理实现unix中的grep命令啊!以下是grep的-v.-c,-n,-i的实现.可是-l功能不会实现.即在多文件搜索匹配字符时,如何只显示含有匹配字符的文件的文件名啊!帮帮忙,告诉我怎么实现吧~谢谢啊! @echo off if "%1"=="" goto forhelp if "%1"=="--help" goto help set %var=find goto findoperation goto end :forhelp ::forhelp switch echo Usage: grep [OPTION]... PATTERN [FILE]... echo Try `grep --help' for more information. goto end :help ::help switch echo Usage: grep [OPTION]... PATTERN [FILE] ... echo Search for PATTERN in each FILE or standard input. echo Example: grep -i 'hello world' menu.h main.c echo -v 显示所有不包含指定 string 的行。 echo -c 计算包含指定 string 的行并显示总数。 echo -n 将文件行号置于每行开头。 echo -i 指定搜索不区分大小写。 goto end :findoperation if "%1"=="" call %var%&goto end if "%1"=="-v" set var=%var% /V&shift&goto findoperation if "%1"=="-n" set var=%var% /N&shift&goto findoperation if "%1"=="-i" set var=%var% /I&shift&goto findoperation if "%1"=="-c" set var=%var% /C&shift&goto findoperation set var=%var% "%1"&shift&goto findoperation :end ::the end of the .bat
如何用批处理实现UNIX中的命令grep! 小弟刚刚批处理入门.有问题像各位高手请教!如何用批处理实现unix中的grep命令啊!以下是grep的-v.-c,-n,-i的实现.可是-l功能不会实现.即在多文件搜索匹配字符时,如何只显示含有匹配字符的文件的文件名啊!帮帮忙,告诉我怎么实现吧~谢谢啊! @echo off if "%1"=="" goto forhelp if "%1"=="--help" goto help set %var=find goto findoperation goto end :forhelp ::forhelp switch echo Usage: grep [OPTION]... PATTERN [FILE]... echo Try `grep --help' for more information. goto end :help ::help switch echo Usage: grep [OPTION]... PATTERN [FILE] ... echo Search for PATTERN in each FILE or standard input. echo Example: grep -i 'hello world' menu.h main.c echo -v 显示所有不包含指定 string 的行。 echo -c 计算包含指定 string 的行并显示总数。 echo -n 将文件行号置于每行开头。 echo -i 指定搜索不区分大小写。 goto end :findoperation if "%1"=="" call %var%&goto end if "%1"=="-v" set var=%var% /V&shift&goto findoperation if "%1"=="-n" set var=%var% /N&shift&goto findoperation if "%1"=="-i" set var=%var% /I&shift&goto findoperation if "%1"=="-c" set var=%var% /C&shift&goto findoperation set var=%var% "%1"&shift&goto findoperation :end ::the end of the .bat
如何用批处理实现UNIX中的命令grep? 小弟刚刚批处理入门.有问题像各位高手请教!如何用批处理实现unix中的grep命令啊!以下是grep的-v.-c,-n,-i的实现.可是-l功能不会实现.即在多文件搜索匹配字符时,如何只显示含有匹配字符的文件的文件名啊!帮帮忙,告诉我怎么实现吧~谢谢啊! @echo off if "%1"=="" goto forhelp if "%1"=="--help" goto help set %var=find goto findoperation goto end :forhelp ::forhelp switch echo Usage: grep [OPTION]... PATTERN [FILE]... echo Try `grep --help' for more information. goto end :help ::help switch echo Usage: grep [OPTION]... PATTERN [FILE] ... echo Search for PATTERN in each FILE or standard input. echo Example: grep -i 'hello world' menu.h main.c echo -v 显示所有不包含指定 string 的行。 echo -c 计算包含指定 string 的行并显示总数。 echo -n 将文件行号置于每行开头。 echo -i 指定搜索不区分大小写。 goto end :findoperation if "%1"=="" call %var%&goto end if "%1"=="-v" set var=%var% /V&shift&goto findoperation if "%1"=="-n" set var=%var% /N&shift&goto findoperation if "%1"=="-i" set var=%var% /I&shift&goto findoperation if "%1"=="-c" set var=%var% /C&shift&goto findoperation set var=%var% "%1"&shift&goto findoperation :end ::the end of the .bat
求助!用批处理实现UNIX中的命令grep! 小弟刚刚批处理入门.有问题像各位高手请教!如何用批处理实现unix中的grep命令啊!以下是grep的-v.-c,-n,-i的实现.可是-l功能不会实现.即在多文件搜索匹配字符时,如何只显示含有匹配字符的文件的文件名啊!帮帮忙,告诉我怎么实现吧~谢谢啊! @echo off if "%1"=="" goto forhelp if "%1"=="--help" goto help set %var=find goto findoperation goto end :forhelp ::forhelp switch echo Usage: grep [OPTION]... PATTERN [FILE]... echo Try `grep --help' for more information. goto end :help ::help switch echo Usage: grep [OPTION]... PATTERN [FILE] ... echo Search for PATTERN in each FILE or standard input. echo Example: grep -i 'hello world' menu.h main.c echo -v 显示所有不包含指定 string 的行。 echo -c 计算包含指定 string 的行并显示总数。 echo -n 将文件行号置于每行开头。 echo -i 指定搜索不区分大小写。 goto end :findoperation if "%1"=="" call %var%&goto end if "%1"=="-v" set var=%var% /V&shift&goto findoperation if "%1"=="-n" set var=%var% /N&shift&goto findoperation if "%1"=="-i" set var=%var% /I&shift&goto findoperation if "%1"=="-c" set var=%var% /C&shift&goto findoperation set var=%var% "%1"&shift&goto findoperation :end ::the end of the .bat
急急急!!!!!!!!!!!!!!!!! 请问各位同学西南交大犀埔校区2007级学经济学的班级写信地址是什么啊?!急急急,有事找人,麻烦知道的告诉一声,谢谢啊!
2007届学经济学的朋友,交个朋友! 2007届学经济学的朋友,交个朋友!留下QQ号吧!!!
1
下一页