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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -