linux-tutorial/codes/shell/示例脚本/输入和输出/列出当前脚本打开的文件描述符.sh

15 lines
124 B
Bash
Raw Normal View History

2019-05-10 11:17:57 +08:00
#!/bin/bash
# testing lsof with file descriptors
2019-10-10 08:56:31 +08:00
exec 3> test
exec 6> test
exec 7< test
2019-05-10 11:17:57 +08:00
lsof -a -p $$ -d0,1,2,3,6,7