Find all writable files in the current directory

后端 未结 10 472
[愿得一人]
[愿得一人] 2020-12-25 11:47

I want to quickly identify all writable files in the directory. What is the quick way to do it?

10条回答
  •  渐次进展
    2020-12-25 12:35

    -f will test for a file

    -w will test whether it's writeable

    Example:

    $ for f in *; do [ -f $f ] && [ -w $f ] && echo $f; done
    

提交回复
热议问题