A way to find all files which contain specific text
find -type f -exec grep -IH 'word' {} \;
If the patters are in a file, use:
xargs -a patterns.txt -I% find Folder/ -name %
A way to find all files which contain specific text
find -type f -exec grep -IH 'word' {} \;
If the patters are in a file, use:
xargs -a patterns.txt -I% find Folder/ -name %
# This is a script for finding bad blocks on hard drive. | |
# Repace "/dev/sdb" with disk you wish to check. | |
sudo fdisk -l | |
sudo badblocks -v /dev/sdb > /tmp/bad-blocks.txt | |
sudo e2fsck -l /tmp/bad-blocks.txt /dev/sdb |
In terminal use the commands
xdg-open . <!--- open here --->
browse . <!--- open here --->
xdg-open <file_name> <!--- open file_name--->
browse . <file_name> <!--- open file_name--->
<DatePicker | |
android:id="@+id/datePicker" | |
style="@android:style/Widget.DatePicker" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:endYear="2100" | |
android:spinnersShown="true" | |
android:startYear="1900"> | |
</DatePicker> |
A way you can protect your code against SQL injections is using prepared statements.
Prepared statements are precompiled SQL commands.
Using MySQLi Object-Oriented:
<?php
$conn = new mysqli($servername, $username, $password, $dbname);
$query = $conn->prepare('SELECT * FROM student WHERE name = ?');
$query->bind_param('s', $name); // 's' specifies the variable type string