![]() |
C++ and the linux API
Using the skeleton below
Code:
#include <unistd.h> // read/writeargument. Use only the Unix/Linux API in your program, do not use standard library functions. echo > File1 ./myrm File1 The answer for this turned out to be: Code:
#include <unistd.h> // read/writeusing the same skeleton Write a C++ application last20 that prints the last 20 characters in a file. Use only the Unix/Linux API in your program, do not use standard library functions. echo 01234567890123456789 > File echo -n Last-20-characters-is >> File ./last20 File ast-20-characters-is Does this involve using the tail command?! Much appreciated, Dave |
Re: C++ and the linux API
I am not a Linux expert but as I can understand syscall( 10, argv[i] ); deletes the files passed as command line.
|
| All times are GMT +5.5. The time now is 01:11. |