Created
April 6, 2013 18:13
-
-
Save klemenzarn/5327039 to your computer and use it in GitHub Desktop.
četrta naloga na kolokviju 2013
This file contains 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 | |
mapa=$(pwd) #trenuten direktori | |
for i in $mapa/* #za vsak file v tem direktoriju | |
do | |
if [ -f $i ] #preverimo če je navadn file (da ni mapa) | |
then | |
informacija=$(lsof $i) #z lsof preverimo kateri proces uporablja to datoteko | |
if [[ -n $informacija ]]; then #če je -n (not null mislim da...) potem vidimo da je v izvajanju | |
echo "Datoteka je v izvajanju: "$i #izpišemo | |
fi | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment