Portál AbcLinuxu, 7. listopadu 2025 00:20
find Html_page/ -type f -iname '*.png' | xargs -i cp -p "{}" /home/peter/Plocha/png/dest="/home/peter/Plocha/png"
find Html_page/ -type f -iname '*.png' | while read f; do
if [ -f "$dest/$f" ]; then # soubor existuje
i=0
while true; do
if [ -f "$dest/$f_$i" ]; then # nový soubor taky existuje
let i=i+1
else
cp -p "$f" "$dest/$f_$i"
break
fi
done
fi
done
netestováno
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.