Size: 390
Comment:
|
Size: 830
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 17: | Line 17: |
= Copy files to other destination = {{{ @echo off REM Mount drive echo Mounting remote drive net use z: \\192.168.1.1\backs password /USER:userx REM copy current day files echo Copying current day files forfiles -p "I:" -s -m *FULL*.sqb -d +0 -c "cmd /c copy @path Z:\BACKUPS\@file" echo Deleting files older than 7 days REM delete files older than 7 days forfiles -p "Z:\BACKUPS" -m *.sqb -d 7 -c "cmd /c del @path" }}} |
Filter unique values from third column, separated by space
cat datax.log | awk -F ' ' '/IMEI/{print $3}' | sort | uniq | wc -l
Filter unique values from third column, separated by :
cat datax.log | awk -F ':' '/IMEI/{print $3}' | sort | uniq | wc -l
Search for text in files recursively
cd startFolder grep -H "textToSearch" * -R
Copy files to other destination
@echo off REM Mount drive echo Mounting remote drive net use z: \\192.168.1.1\backs password /USER:userx REM copy current day files echo Copying current day files forfiles -p "I:" -s -m *FULL*.sqb -d +0 -c "cmd /c copy @path Z:\BACKUPS\@file" echo Deleting files older than 7 days REM delete files older than 7 days forfiles -p "Z:\BACKUPS" -m *.sqb -d 7 -c "cmd /c del @path"