lab1
所属分类:嵌入式Linux
开发工具:C/C++
文件大小:53KB
下载次数:13
上传日期:2009-08-18 10:21:15
上 传 者:
refinebin
说明: linux shell。c语言编写的linux shell.适合初学者。
(linux shell. c languages linux shell. suitable for beginners.)
文件列表:
lab1\456 (0, 2009-06-01)
lab1\456456 (0, 2009-06-01)
lab1\a.out (8495, 2009-06-01)
lab1\cat (5432, 2009-06-01)
lab1\cat.c (777, 2009-06-01)
lab1\chmod (6260, 2009-06-01)
lab1\chmod.c (2437, 2009-06-01)
lab1\date (4919, 2009-06-01)
lab1\date.c (163, 2009-06-01)
lab1\echo (4802, 2009-06-01)
lab1\echo.c (221, 2009-06-01)
lab1\hello (4727, 2009-06-01)
lab1\hello.c (91, 2009-06-01)
lab1\help (5066, 2009-06-01)
lab1\help.c (428, 2009-06-01)
lab1\history (6044, 2009-06-01)
lab1\history.c (846, 2009-06-01)
lab1\kill (5322, 2009-06-01)
lab1\kill.c (496, 2009-06-01)
lab1\ls (8877, 2009-06-01)
lab1\ls.c (6656, 2009-06-01)
lab1\makefile (183, 2009-06-01)
lab1\mkdir (5090, 2009-06-01)
lab1\mkdir.c (386, 2009-06-01)
lab1\more (5882, 2009-06-01)
lab1\more.c (850, 2009-06-01)
lab1\rm (5072, 2009-06-01)
lab1\rm.c (254, 2009-06-01)
lab1\rmdir (5078, 2009-06-01)
lab1\rmdir.c (305, 2009-06-01)
lab1\time (6451, 2009-06-01)
lab1\time.c (1525, 2009-06-01)
lab1\wc (6327, 2009-06-01)
lab1\wc.c (1659, 2009-06-01)
lab1\who (5566, 2009-06-01)
lab1\who.c (633, 2009-06-01)
lab1\wzl_mysh (8495, 2009-06-01)
lab1\wzl_mysh.c (3071, 2009-06-01)
lab1\123 (0, 2009-06-01)
... ...
wzl_mysh
Introduction
============
This software is the WZL Persional Shell, used to receive command
and execute it. It now can support some common commands such as
'ls(-l)', 'date','rm','rmdir', etc. But its function is still weak,
we will improve it in the near future.
In the exec() function, we use fork and execv functiom:
First we do a fork operation, and make a child process,
then we call execv() to execute our command in the child process.
The execv(const char *path,char * char argv[]) execute the file
standed for by *path.
In the parent process, we just wait the child's exit.
Software Manual
===============
1. How to compile and link?
just type: "make" in the your shell.
2. How to use it?
just type: "./wzl_mysh".
3. How to get help?
just type: "help" in the wzl_mysh.
4. Executable command in the wzl_mysh:
help
exit
ls [-l]
date
mkdir
rm
rmdir
kill
who
cd
pwd
time
cat
more
chmod
history
echo
wc
5. Directory 123,link-file 789,common files 456 and 45***56 are
used to validate the function.
6. Also it can execute user's programs
Author's Information
====================
Author name: Zhenglei Wang
Student number: 1120070388
近期下载者:
相关文件:
收藏者: