Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main(){
- int pid = fork();
- if(pid == 0){ //le fils
- system("find ./ -mindepth 2 -maxdepth 2 | wc -l > /tmp/compte.data");
- } else{ //le pere
- system("ps -f");
- wait(&pid);
- system("x=$(cat /tmp/compte.data);echo Le nombre de fichiers dans les sous répertoires du répertoire courant est de: $x fichiers.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement