Visit Our UNIX and Linux User Community


How command is executed


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How command is executed
# 1  
Old 01-09-2011
How command is executed

as i have been new to unix

can any one can tell,when be type a command on unix shell what processing it goes through before execution of it
# 2  
Old 01-10-2011
The shell expands globbed wild card file names not quoted, $variables, `` and $() subshell to string commands, and then calls fork to get a child process and it calls execvp() to replace the code while keeping some open files, signal masks, environment if replacement not supplied. Loading a program means instantiating any static objects if c++ and calling main() with the arguments. Arguments are provided as one vector argv of string pointers plus one null pointer as an end signal, where the strings are null terminated char arrays[]. See man execvp(). Meanwhile, if no '&', the parent shell process wait()'s for the child to terminate, or for a signal, possibly from your keyboard handler, like ^C for interrupt or ^Z for stop. You can see all the details if you call your shell under truss, tusc or strace, which shows all process to kernel calls, and is very educational:
Code:
$ truss -ap ksh -c 'date "+%Y-%m-%d" ' 2>&1|grep -v sigprocmask   
[11978] execve(0x7b0f5bd0, 0x7b0f54ac, 0x7b0f54bc) ........................ [entry]
                              argv[0] @ 0x7b0f0009: "ksh"
                              argv[1] @ 0x7b0f000d: "-c"
                              argv[2] @ 0x7b0f0010: "date "+%Y-%m-%d" "
[11978] execve("/usr/bin/ksh", 0x7b0f54ac, 0x7b0f54bc) .................... = 0 [32-bit]
[11978] utssys(0x7b0f7860, 0, 0) .......................................... = 0
[11978] open("/usr/lib/dld.sl", O_RDONLY, 052254) ......................... = 3
[11978] read(3, "02\v010e0512@ \0E 1d0214\0\0\0\0".., 128) ................ = 128
[11978] lseek(3, 128, SEEK_SET) ........................................... = 128
[11978] read(3, "10\0\004\0\0\0( \0033 94\0\0\0\0".., 48) ................. = 48
[11978] mmap(NULL, 209812, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB|MAP_STATICPREDICTION, 3, 40960) = 0xc0010000
[11978] mmap(NULL, 17752, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_SHLIB, 3, 253952) = 0x7b0eb000
[11978] close(3) .......................................................... = 0
[11978] sysconf(_SC_CPU_VERSION) .......................................... = 532
[11978] utssys(0x7b0f7c60, 0, 0) .......................................... = 0
[11978] getuid() .......................................................... = 3080 (3080)
[11978] getuid() .......................................................... = 3080 (3080)
[11978] getgid() .......................................................... = 6900 (6900)
[11978] getgid() .......................................................... = 6900 (6900)
[11978] mmap(NULL, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7b0e9000
[11978] open("/opt/graphics/OpenGL/lib/libogltls.sl", O_RDONLY, 0200) ..... ERR#2 ENOENT
[11978] open("/usr/lib/libc.2", O_RDONLY, 0200) ........................... = 3
[11978] fstat(3, 0x7b0f8508) .............................................. = 0
[11978] read(3, "0210010e0512@ \0\0\0\0\0\0\0\0\0".., 128) ................ = 128
[11978] lseek(3, 128, SEEK_SET) ........................................... = 128
[11978] read(3, "10\0\004\0\0\0( \012e3< \0\010\0".., 48) ................. = 48
[11978] read(3, "80\0\0\v\0\0\004\0\0\0\0", 12) ........................... = 12
[11978] mmap(NULL, 1241088, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 290816) = 0xc0100000
[11978] mmap(NULL, 57344, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|MAP_SHLIB, -1, 0) = 0x7b0db000
[11978] mmap(0x7b0d2000, 36864, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_SHLIB, 3, 1531904) = 0x7b0d2000
[11978] mmap(NULL, 16384, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7b0ce000
[11978] close(3) .......................................................... = 0
[11978] open("/usr/lib/libdld.2", O_RDONLY, 0200) ......................... = 3
[11978] fstat(3, 0x7b0f8708) .............................................. = 0
[11978] read(3, "02\v010e0512@ \0E 1d0217\0\0\0\0".., 128) ................ = 128
[11978] lseek(3, 128, SEEK_SET) ........................................... = 128
[11978] read(3, "10\0\004\0\0\0( \0\0) \ \0\010\0".., 48) ................. = 48
[11978] read(3, "80\0\0\v\0\0\004\0\0\0\0", 12) ........................... = 12
[11978] mmap(NULL, 12288, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 8192) = 0xc0003000
[11978] mmap(NULL, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_SHLIB, 3, 20480) = 0x7b0cd000
[11978] close(3) .......................................................... = 0
[11978] open("/usr/lib/libxti.2", O_RDONLY, 0200) ......................... = 3
[11978] fstat(3, 0x7b0f8508) .............................................. = 0
[11978] read(3, "0210010e0512@ \0\0\0\0\0\0\0\0\0".., 128) ................ = 128
[11978] lseek(3, 128, SEEK_SET) ........................................... = 128
[11978] read(3, "10\0\004\0\0\0( \001D t \0\010\0".., 48) ................. = 48
[11978] read(3, "80\0\0\v\0\0\004\0\0\0\0", 12) ........................... = 12
[11978] mmap(NULL, 86016, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 20480) = 0xc0050000
[11978] mmap(NULL, 20480, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_SHLIB, 3, 106496) = 0x7b0c8000
[11978] close(3) .......................................................... = 0
[11978] open("/usr/lib/libnsl.1", O_RDONLY, 0200) ......................... = 3
[11978] fstat(3, 0x7b0f8508) .............................................. = 0
[11978] read(3, "0210010e0512@ \0\0\0\0\0\0\0\0\0".., 128) ................ = 128
[11978] lseek(3, 128, SEEK_SET) ........................................... = 128
[11978] read(3, "10\0\004\0\0\0( \0\ac604\0\010\0".., 48) ................. = 48
[11978] read(3, "80\0\0\v\0\0\004\0\0\0\0", 12) ........................... = 12
[11978] mmap(NULL, 512000, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 114688) = 0xc0080000
[11978] mmap(NULL, 24576, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|MAP_SHLIB, -1, 0) = 0x7b0c2000
[11978] mmap(0x7b0b3000, 61440, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_SHLIB, 3, 626688) = 0x7b0b3000
[11978] mmap(NULL, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7b0b1000
[11978] close(3) .......................................................... = 0
[11978] open("/usr/lib/libxti.2", O_RDONLY, 0) ............................ = 3
[11978] fstat(3, 0x7b0f8708) .............................................. = 0
[11978] close(3) .......................................................... = 0
[11978] mmap(NULL, 16384, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7b0ad000
[11978] mmap(NULL, 104, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7b0ac000
[11978] sigsetreturn(0x7b0cfd56, 0x6211988, 1392) ......................... = 0
[11978] brk(0x40008068) ................................................... = 0
[11978] sysconf(_SC_OPEN_MAX) ............................................. = 2048
[11978] brk(0x4000a868) ................................................... = 0
[11978] brk(0x4000ec68) ................................................... = 0
[11978] close(2046) ....................................................... ERR#9 EBADF
[11978] close(2045) ....................................................... ERR#9 EBADF
[11978] close(2044) ....................................................... ERR#9 EBADF
[11978] close(2043) ....................................................... ERR#9 EBADF
[11978] close(2042) ....................................................... ERR#9 EBADF
[11978] close(2048) ....................................................... ERR#9 EBADF
[11978] close(2047) ....................................................... ERR#9 EBADF
[11978] getuid() .......................................................... = 3080 (3080)
[11978] getuid() .......................................................... = 3080 (3080)
[11978] getgid() .......................................................... = 6900 (6900)
[11978] getgid() .......................................................... = 6900 (6900)
[11978] time(0x40004880) .................................................. = 1294677535
[11978] sigsetreturn(0x7b0cfd56, 0x6211988, 1392) ......................... = 0
[11978] sigaction(SIGWINCH, NULL, 0x7b0f59a8) ............................. = 0
[11978] sigsetreturn(0x7b0cfd56, 0x6211988, 1392) ......................... = 0
[11978] sigvector(SIGABRT, 0x7b0f5a28, 0x7b0f5a38) ........................ = 0
[11978] sigvector(SIGALRM, 0x7b0f5a28, 0x7b0f5a38) ........................ = 0
[11978] sigvector(SIGBUS, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGCLD, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGEMT, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGFPE, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGHUP, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGILL, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGINT, 0x7b0f5a68, 0x7b0f5a78) ......................... = 0
[11978] sigvector(SIGABRT, 0x7b0f5a28, 0x7b0f5a38) ........................ = 0
[11978] sigvector(SIGPIPE, 0x7b0f5a28, 0x7b0f5a38) ........................ = 0
[11978] sigvector(SIGQUIT, 0x7b0f5a68, 0x7b0f5a78) ........................ = 0
[11978] sigvector(SIGRT8, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGRT7, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGRT6, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGRT5, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGRT1, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGRT2, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGRT3, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGRT4, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGSYS, 0x7b0f5a28, 0x7b0f5a38) ......................... = 0
[11978] sigvector(SIGTERM, 0x7b0f5a28, 0x7b0f5a38) ........................ = 0
[11978] sigvector(SIGTRAP, 0x7b0f5a28, 0x7b0f5a38) ........................ = 0
[11978] sigvector(SIGUSR1, 0x7b0f5a28, 0x7b0f5a38) ........................ = 0
[11978] sigvector(SIGUSR2, 0x7b0f5a28, 0x7b0f5a38) ........................ = 0
[11978] sigvector(SIGWINCH, 0x7b0f5a28, 0x7b0f5a38) ....................... = 0
[11978] sigvector(_SIGXFSZ, 0x7b0f5a68, 0x7b0f5a78) ....................... = 0
[11978] open("/usr/lib/nls/loc/locales.2/C", O_RDONLY, 0200) .............. = 3
[11978] fstat(3, 0x7b0f7e08) .............................................. = 0
[11978] read(3, "0210010e0512@ \0\0\0\0\0\0\0\0\0".., 128) ................ = 128
[11978] lseek(3, 128, SEEK_SET) ........................................... = 128
[11978] read(3, "10\0\004\0\0\0( \0\0! e0\0\010\0".., 48) ................. = 48
[11978] read(3, "80\0\001\0\0\0  9 2 4 5 ", 12) ........................... = 12
[11978] mmap(NULL, 12288, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 4096) = 0xc0006000
[11978] mmap(NULL, 12288, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_SHLIB, 3, 16384) = 0x7b0a9000
[11978] close(3) .......................................................... = 0
[11978] stat("/usr/lib/nls/loc/locales.2/C", 0x7b0f7478) .................. = 0
[11978] time(NULL) ........................................................ = 1294677535
[11978] brk(0x40011868) ................................................... = 0
[11978] brk(0x40012068) ................................................... = 0
[11978] brk(0x40012868) ................................................... = 0
[11978] brk(0x40013468) ................................................... = 0
[11978] brk(0x40013c68) ................................................... = 0
[11978] brk(0x40014468) ................................................... = 0
[11978] brk(0x40014c68) ................................................... = 0
[11978] brk(0x40015468) ................................................... = 0
[11978] brk(0x40015c68) ................................................... = 0
[11978] brk(0x40016468) ................................................... = 0
[11978] brk(0x40016c68) ................................................... = 0
[11978] brk(0x40017468) ................................................... = 0
[11978] brk(0x40017c68) ................................................... = 0
[11978] brk(0x40018868) ................................................... = 0
[11978] brk(0x40019068) ................................................... = 0
[11978] stat64("/dhome1/n/nbkodln", 0x7b0f5ea0) ........................... = 0
[11978] stat64(".", 0x7b0f5f18) ........................................... = 0
[11978] sigaction(SIGWINCH, NULL, 0x7b0f59a8) ............................. = 0
[11978] getpid() .......................................................... = 11978 (11977)
[11978] getpid() .......................................................... = 11978 (11977)
[11978] brk(0x40015068) ................................................... = 0
[11978] stat("/appl/sybase/OCS-12_0.10733/bin/date", 0x7b0f5f60) .......... ERR#2 ENOENT
[11978] stat("bin/date", 0x7b0f5f60) ...................................... ERR#2 ENOENT
[11978] stat("/appl/sybase/OCS-12_0.10733/bin/date", 0x7b0f5f60) .......... ERR#2 ENOENT
[11978] stat("date", 0x7b0f5f60) .......................................... ERR#2 ENOENT
[11978] stat("/usr/bin/date", 0x7b0f5f60) ................................. = 0
[11978] getpid() .......................................................... = 11978 (11977)
[11978] sigvector(_SIGXFSZ, 0x7b0f5f68, 0x7b0f5f78) ....................... = 0
[11978] sigvector(SIGQUIT, 0x7b0f5f68, 0x7b0f5f78) ........................ = 0
[11978] brk(0x40015468) ................................................... = 0
[11978] brk(0x40015868) ................................................... = 0
[11978] execve(0x400150c6, 0x400144b8, 0x4001493c) ........................ [entry]
                              argv[0] @ 0x40014479: "date"
                              argv[1] @ 0x4001449d: "+%Y-%m-%d"
[11978] execve("/usr/bin/date", 0x400144b8, 0x4001493c) ................... = 0 [32-bit]
[11978] utssys(0x7b0f7830, 0, 0) .......................................... = 0
[11978] open("/usr/lib/dld.sl", O_RDONLY, 052170) ......................... = 3
[11978] read(3, "02\v010e0512@ \0E 1d0214\0\0\0\0".., 128) ................ = 128
[11978] lseek(3, 128, SEEK_SET) ........................................... = 128
[11978] read(3, "10\0\004\0\0\0( \0033 94\0\0\0\0".., 48) ................. = 48
[11978] mmap(NULL, 209812, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB|MAP_STATICPREDICTION, 3, 40960) = 0xc0010000
[11978] mmap(NULL, 17752, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_SHLIB, 3, 253952) = 0x7b0eb000
[11978] close(3) .......................................................... = 0
[11978] sysconf(_SC_CPU_VERSION) .......................................... = 532
[11978] utssys(0x7b0f7c30, 0, 0) .......................................... = 0
[11978] getuid() .......................................................... = 3080 (3080)
[11978] getuid() .......................................................... = 3080 (3080)
[11978] getgid() .......................................................... = 6900 (6900)
[11978] getgid() .......................................................... = 6900 (6900)
[11978] mmap(NULL, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7b0e9000
[11978] open("/opt/graphics/OpenGL/lib/libogltls.sl", O_RDONLY, 0200) ..... ERR#2 ENOENT
[11978] open("/usr/lib/libc.2", O_RDONLY, 0200) ........................... = 3
[11978] fstat(3, 0x7b0f84d8) .............................................. = 0
[11978] read(3, "0210010e0512@ \0\0\0\0\0\0\0\0\0".., 128) ................ = 128
[11978] lseek(3, 128, SEEK_SET) ........................................... = 128
[11978] read(3, "10\0\004\0\0\0( \012e3< \0\010\0".., 48) ................. = 48
[11978] read(3, "80\0\0\v\0\0\004\0\0\0\0", 12) ........................... = 12
[11978] mmap(NULL, 1241088, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 290816) = 0xc0100000
[11978] mmap(NULL, 57344, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|MAP_SHLIB, -1, 0) = 0x7b0db000
[11978] mmap(0x7b0d2000, 36864, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_SHLIB, 3, 1531904) = 0x7b0d2000
[11978] mmap(NULL, 16384, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7b0ce000
[11978] close(3) .......................................................... = 0
[11978] open("/usr/lib/libdld.2", O_RDONLY, 0200) ......................... = 3
[11978] fstat(3, 0x7b0f86d8) .............................................. = 0
[11978] read(3, "02\v010e0512@ \0E 1d0217\0\0\0\0".., 128) ................ = 128
[11978] lseek(3, 128, SEEK_SET) ........................................... = 128
[11978] read(3, "10\0\004\0\0\0( \0\0) \ \0\010\0".., 48) ................. = 48
[11978] read(3, "80\0\0\v\0\0\004\0\0\0\0", 12) ........................... = 12
[11978] mmap(NULL, 12288, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 8192) = 0xc0003000
[11978] mmap(NULL, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_SHLIB, 3, 20480) = 0x7b0cd000
[11978] close(3) .......................................................... = 0
[11978] mmap(NULL, 16384, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7b0c9000
[11978] mmap(NULL, 88, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7b0c8000
[11978] sigsetreturn(0x7b0cfd56, 0x6211988, 1392) ......................... = 0
[11978] sysconf(_SC_CPU_VERSION) .......................................... = 532
[11978] brk(0x40001558) ................................................... = 0
[11978] brk(0x4000354c) ................................................... = 0
[11978] brk(0x40004000) ................................................... = 0
[11978] open("/usr/lib/nls/loc/locales.2/C", O_RDONLY, 0200) .............. = 3
[11978] fstat(3, 0x7b0f82d8) .............................................. = 0
[11978] read(3, "0210010e0512@ \0\0\0\0\0\0\0\0\0".., 128) ................ = 128
[11978] lseek(3, 128, SEEK_SET) ........................................... = 128
[11978] read(3, "10\0\004\0\0\0( \0\0! e0\0\010\0".., 48) ................. = 48
[11978] read(3, "80\0\001\0\0\0  9 2 4 5 ", 12) ........................... = 12
[11978] mmap(NULL, 12288, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 4096) = 0xc0006000
[11978] mmap(NULL, 12288, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_SHLIB, 3, 16384) = 0x7b0c5000
[11978] close(3) .......................................................... = 0
[11978] stat("/usr/lib/nls/loc/locales.2/C", 0x7b0f7948) .................. = 0
[11978] getuid() .......................................................... = 3080 (3080)
[11978] getuid() .......................................................... = 3080 (3080)
[11978] getgid() .......................................................... = 6900 (6900)
[11978] getgid() .......................................................... = 6900 (6900)
[11978] open("/prod1/csdsit/cs_core/200708/locale/date", O_RDONLY, 0) ..... ERR#2 ENOENT
[11978] open("/prod1/csdsit/cs_core/200708/locale/date.cat", O_RDONLY, 0177777) ERR#2 ENOENT
[11978] open("/prod1/csdsit/cs_access/200708/locale/date", O_RDONLY, 02) .. ERR#2 ENOENT
[11978] open("/prod1/csdsit/cs_access/200708/locale/date.cat", O_RDONLY, 0177777) ERR#2 ENOENT
[11978] open("/prod1/csdsit/csc_ghis/201006/locale/date", O_RDONLY, 01) ... ERR#2 ENOENT
[11978] open("/prod1/csdsit/csc_ghis/201006/locale/date.cat", O_RDONLY, 0177777) ERR#2 ENOENT
[11978] open("/prod1/csdsit/csb_addrqa/200708/locale/date", O_RDONLY, 03) . ERR#2 ENOENT
[11978] open("/prod1/csdsit/csb_addrqa/200708/locale/date.cat", O_RDONLY, 0177777) ERR#2 ENOENT
[11978] open("/prod1/csdsit/csd_mbnais/201002/locale/date", O_RDONLY, 03) . ERR#2 ENOENT
[11978] open("/prod1/csdsit/csd_mbnais/201002/locale/date.cat", O_RDONLY, 0177777) ERR#2 ENOENT
[11978] open("/prod1/csdsit/csd_mbnacf/201011/locale/date", O_RDONLY, 03) . ERR#2 ENOENT
[11978] open("/prod1/csdsit/csd_mbnacf/201011/locale/date.cat", O_RDONLY, 0177777) ERR#2 ENOENT
[11978] open("/usr/lib/nls/msg/C/date.cat", O_RDONLY, 0177777) ............ = 3
[11978] fstat(3, 0x7b0f6cc8) .............................................. = 0
[11978] fcntl(3, F_SETFD, 1) .............................................. = 0
[11978] time(0x40001538) .................................................. = 1294677535
[11978] brk(0x40006000) ................................................... = 0
[11978] stat("/usr/lib/tztab", 0x7b0f5f68) ................................ = 0
[11978] open("/usr/lib/tztab", O_RDONLY, 0166460) ......................... = 5
[11978] mmap(NULL, 15912, PROT_READ, MAP_PRIVATE, 5, 0) ................... = 0x7b0c1000
[11978] close(5) .......................................................... = 0
[11978] brk(0x40008000) ................................................... = 0
[11978] ioctl(1, TCGETA, 0x7b0f6230) ...................................... ERR#25 ENOTTY
2011-01-10
[11978] write(1, "2 0 1 1 - 0 1 - 1 0 \n", 11) ............................ = 11
[11978] exit(0) ........................................................... WIFEXITED(0)
$


Last edited by DGPickett; 01-10-2011 at 12:41 PM..

Previous Thread | Next Thread
Test Your Knowledge in Computers #933
Difficulty: Medium
Microcontrollers operating within embedded systems (such as the Raspberry Pi, Arduino, and other similar systems) always have internal hardware to keep track of time.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Set Command to output a log of every command executed in the script

Hi Guys, I like to output every command executed in the script to a file. I have tried set -x which does the same. But it is not giving the logs of the child script which is being called from my script. Is there any parameters in the Set command or someother way where i can see the log... (2 Replies)
Discussion started by: mac4rfree
2 Replies

2. Shell Programming and Scripting

Need to echo command successful if command is executed successfully

Hello, I have written a command n shell script : srvctl relocate service -d t1 -s s1 -i i1 -t t1 -f If the above command executes successfully without error I need to echo "Service relocated successfully and If it errors out I need to trap the errors in a file and also need to make... (1 Reply)
Discussion started by: Vishal_dba
1 Replies

3. Shell Programming and Scripting

Command is executed twice

Hi I try to run a command using bash script. The script should now look like this: #!/bin/bash case "$1" in start) sudo su - cispmgm -c "/usr/local/jdk/bin/java -Dworking.dir=/opt/ibm/cisp -Denvironment.target= -Xms512M -Xmx1024M -classpath... (3 Replies)
Discussion started by: nikolai.straess
3 Replies

4. Shell Programming and Scripting

Command is executed twice

Hi I try to run a command using bash script. The script should now look like this: #!/bin/bash case "$1" in start) sudo su - cispmgm -c "/usr/local/jdk/bin/java -Dworking.dir=/opt/ibm/cisp -Denvironment.target= -Xms512M -Xmx1024M -classpath... (1 Reply)
Discussion started by: nikolai.straess
1 Replies

5. AIX

Script not getting executed via cron but executes when executed manually.

Hi Script not getting executed via cron but executes successfully when executed manually. Please assist cbspsap01(appuser) /app/scripts > cat restart.sh #!/bin/ksh cd /app/bin date >>logfile.out echo "Restart has been started....." >>logfile.out date >>logfile.out initfnsw -y restart... (3 Replies)
Discussion started by: samsungsamsung
3 Replies

6. Shell Programming and Scripting

System Command dies even when command gets executed successfully

Hi I have created a perl script & running it using Linux machine. I want my script to die when system command is unsuccessful but script is dying even when system command gets executed successfully. :wall: I am using the command below :- system($cmd) || die "FAILED $!"; print "Hello"; ... (2 Replies)
Discussion started by: Priyanka Gupta
2 Replies

7. Shell Programming and Scripting

Need help! command working ok when executed in command line, but fails when run inside a script!

Hi everyone, when executing this command in unix: echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error. here is content of my script: tdbsrvr$ vi hc.sh "hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies

8. Windows & DOS: Issues & Discussions

OpenSSH command not executed

OpenSSH does not execute commands when they are issued from the command line. I connect from a Win PC to a Win server (2003), using openssh. If I type the name of the bat file from the prompt, it starts. But when I add the command to the ssh command it does not work: ssh -vvv -i "keyname.key"... (4 Replies)
Discussion started by: DocBrewer
4 Replies

9. Cybersecurity

Help Required: Command to find IP address and command executed of a user

Hi, I am trying to write a script which would figure out who has run which command and their IP. As i dont have any clue as to which commands would do this job, i request some gurus to help me on this. Thanks Vishwas (2 Replies)
Discussion started by: loggedout
2 Replies

10. UNIX for Advanced & Expert Users

Any way to know wt command has been executed from last 2-3 days ?

Is there any way to know, what I have executed on UNIX Command prompt from last 2-3 days ? One more point, some systems are interconnected, is there any way to know, who others have executed what command from last 2-3 days ? I am in big trouble guys. Please help me out ASAP. I am working in... (3 Replies)
Discussion started by: manoja422002
3 Replies

Featured Tech Videos