Added bin/procfiles.sh
This commit is contained in:
parent
7294bc2b78
commit
ac69026fa3
2 changed files with 18 additions and 1 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -8,13 +8,14 @@
|
|||
!bin/gnucash.sh
|
||||
!bin/hanez.org.sh
|
||||
!bin/jack.sh
|
||||
!bin/steam.sh
|
||||
!bin/procfiles.sh
|
||||
!bin/motd.sh
|
||||
!bin/myip.sh
|
||||
!bin/nas-boot.sh
|
||||
!bin/nas-reboot.sh
|
||||
!bin/nas-shutdown.sh
|
||||
!bin/stats.sh
|
||||
!bin/steam.sh
|
||||
|
||||
!.config
|
||||
!.config/awesome
|
||||
|
|
|
|||
16
bin/procfiles.sh
Executable file
16
bin/procfiles.sh
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
#1/bin/bash
|
||||
|
||||
PROCNAME=$1
|
||||
|
||||
if [ -z "${PROCNAME}" ]; then
|
||||
echo "Please set proc name!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PROCFILES=$(ps -C $1 -o pid=)
|
||||
|
||||
for proc in ${PROCFILES}; do
|
||||
echo $proc
|
||||
ls -l /proc/$proc/fd
|
||||
done
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue