linux-tutorial/codes/shell/示例脚本/输入和输出/列出当前脚本打开的文件描述符.sh
2019-10-10 08:56:31 +08:00

15 lines
124 B
Bash

#!/bin/bash
# testing lsof with file descriptors
exec 3> test
exec 6> test
exec 7< test
lsof -a -p $$ -d0,1,2,3,6,7