Created
May 17, 2023 11:31
-
-
Save nicc777/5260c90c9e88e6fff69dc46fbe739766 to your computer and use it in GitHub Desktop.
Linux: Identify all files in a directory not currently open by an application
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for f in *; do | |
fuser -s "$f" || echo "$f" >> /tmp/files | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment