Kod: Zaznacz cały
find -type f -printf "%p\n" | grep .txt$Jakieś propozycje?
.
Kod: Zaznacz cały
find -type f -printf "%p\n" | grep .txt$Kod: Zaznacz cały
find . -type f -iname "*.txt"Kod: Zaznacz cały
man findKod: Zaznacz cały
find . -type f -iname "*.txt" -printf "%f\n"Kod: Zaznacz cały
#!/bin/bash
# Program 
if [ $# -eq 0 ]; then
echo "Nie wybrales parametru"
elif [ $# -gt 1 ]; then
echo "Wybrales za duzo parametrow"
else
select x in w s exit
do
	case $x in
	"w") find * -type f -size -1024c -iname "*.txt" -printf "%f\n" | xargs rm -i >>dane.txt;;
	"s") find * -type f -size +1024c -iname "*.txt" | xargs tar -rf archiwum.tar; gzip archiwum.tar;;
	"exit") exit;;
	*) echo "Nie wybrano zadnej opcji opcji";;
	esac
	break
done
fi
Kod: Zaznacz cały
bash: y: command not found Kod: Zaznacz cały
man findKod: Zaznacz cały
 find . -mtime -5 -printKod: Zaznacz cały
find . -mtime -1 -print
find . -mtime -2 -print 
find . -mtime -3 -print 
find . -mtime -4 -print 
find . -mtime -5 -print