I creart the first terminal , then I use "sleep 1000 &" and I found it by "ps". The problem is when I creat the second terminal and put "ps" ,there is no sleep process. I want to know why ?
The problem is when I create the second terminal and put "ps" ,there is no
When that is the case, you won't see any
sleep process because there is none. The process which is then sleep(3)-ing is your Unix shell; you could even write your own shell interpreter (look into sash for an easy but a little bit buggy example).
Many Linux shells are open source software (or free software), so please study their source code to find out if they do call sleep(3) or usleep(3) -or even appropriately poll(2), etc ...- See also time(7) and select_tut(2). Read more about syscalls(2) and think of those done by your shell (or observe them with strace(1) or ltrace(1) or a debugger) .
My personal preference is
zsh (whose autocompletion facilities on Debian are outstanding).