List active Files in Folder (e.g. Files that are uploaded via SCP)
#!/usr/local/bin/bash
FOLDER=/var/upload
FILES="$(/usr/bin/fstat -f ${FOLDER} | awk 'NR>1 {print $6}')"
for i in $FILES
do
find -x ${FOLDER} -inum $i
done
Written by Philipp Haußleiter
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#