grep '^your_word' /path/to/file | wc -l
[highlighter line=0]
grep '^your_word' /path/to/file | wc -l
[highlighter line=0]
Simple message with text in the body of the email
mutt -s "Test from domain" user@domain.com < /temp/message.txt
And if you need to send an attachment
mutt -s "Test from domain" user@domain.com < /temp/message.txt -a /temp/file.jpg
This is another way to write the test, having the body in the same line.
echo "This is the body" | mutt -s "Testing mutt" user@domain.com -a /temp/file.jpg
[highlighter line=0]
zcat file.gz | grep string
[highlighter line=0]
Your CPU and memory will do all the work. Nothing will be stored on the harddrive.
Behind a firewall? Use the following commands.
tar xzf Test-Class-0.37.tar.gz
cd Test-Class-0.37
perl Makefile.PL
make
make test
make install
To upload the files the PSCP command line usage in this example will be:
From Windows to Linux.
pscp \ [user@]host:/dir
Upload all firmware files except the .web file using the following commands. You will be asked for the password (= password) for each file:
Examples
pscp.exe C:\DR64_5132\image username@10.0.0.1:
pscp.exe C:\DR64_5132\sbios1 username@10.0.0.1:
pscp.exe C:\DR64_5132\image4.c1 username@10.0.0.1:
pscp.exe C:\DR64_5132\logcodes.txt username@10.0.0.1:
Create a custom log file within /etc/logrotate.d directory.
touch /etc/logrotate.d/customlog
Add the following to your /etc/logrotate.d/customlog file.
/var/log/customlog { daily missingok compresscmd=/bin/gzip compressext=.gz compress sharedscripts # postrotate # endscript }
[highlighter]
Restart logrotate
sudo /usr/sbin/logrotate /etc/logrotate.conf
Done