broken_symlinks: Nuevo
This commit is contained in:
parent
738a7a92d4
commit
503e13aab7
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
# Script para buscar enlaces simbólicos rotos en el directorio actual
|
||||
# Si se desea buscar en todo el sistema cambiar ./ por /
|
||||
|
||||
find ./ -type l > tmp
|
||||
while IFS= read -r file
|
||||
do
|
||||
cd "$(dirname "$file")" || return
|
||||
if [ ! -e "$(readlink "$(basename "$file")")" ]; then
|
||||
ls -g "$file" | awk '{print $8" "$9" "$10}'
|
||||
echo "Realpath: $(realpath "$file")"
|
||||
fi
|
||||
cd - > /dev/null || exit
|
||||
done < tmp
|
||||
rm tmp
|
Loading…
Reference in New Issue