列出当前脚本打开的文件描述符

5年以前  |  阅读数:472 次  |  编程语言:Shell 
#!/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





Copyright© 2013-2020

All Rights Reserved 京ICP备2023019179号-8