bash - How to know if a process is going to get "Permission denied" -
me@ubuntu:~$ cat /proc/10/syscall cat: /proc/10/syscall: permission denied
i want know ahead of time if have permission access syscall
.
i tried this:
file=/proc/$n/syscall if [ -r $file ]; cat /proc/$n/syscall else echo "can't read" fi
but it's not working.
any ideas?
thanks.
Comments
Post a Comment