You can mount ntfs a couple of different ways in linux. Here is how you do it with ufsd or ntfs-3g. ufsd needs a kernel module installed. ntfs-3g can just be installedRead More…
iptables -A INPUT -m conntrack –ctstate ESTABLISHED,RELATED -j ACCEPT
Firewalls usually block all inbound connections (unless we have a port forward setup, or the traffic is return traffic). Also firewalls usually allow all outbound traffic (unless we are in a veryRead More…
How Versions of SAMBA relate to versions of SMB/CIFS
Wait you thought Samba and SMB and CIFs are all the same thing? Well kind of. The are all part of the same protocol that allows file sharing, and gives you theRead More…
WordPress Count Users Created Each Day Stats
Login to Mysql (notice username and password touch the -u and -p argument) # mysql -uusername -ppassword mysql> SHOW databases; +——————–+ | Database | +——————–+ | information_schema | | mysql | |Read More…
See if files/folders/symlinks/etc… are missing from Debian Package
Lets see what files are missing from packages that are partially installed. Note this will not work on packages that are not at least part way installed (they need to be listedRead More…
inotify-utils: Monitor new files before they delete – example /tmp scripts
If you have binary programs or scripts generating files in /tmp and you want to grab them before they disappear, then use this script. You can copy them. If you copy themRead More…
Debian – See all files in packages with word in them – double xargs
Final: (PKG="linux"; dpkg -l | grep $PKG | awk '{print $2}' | xargs -I %% /bin/bash -c 'echo "—%%—-"; dpkg -L "%%" | xargs -I @@ /bin/bash -c "[[ -f '@@' ]]Read More…
Check Line Ending Type with Hex tool like OD – EOL end of line character
Check for line endings with od (also you can use other hex tools with -c option – which is the Printable Characters format) od -c file DOS: \r \n (carriage return andRead More…
Rsync thru SSH Error: protocol version mismatch — is your shell clean?
The problem / error: When doing an rsync over ssh file transfer I get this error. # rsync -avhP -e "ssh -p 22 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" file root@someserver.com:file Warning: Permanently added '[root@someserver.com]:22,[24.155.888.155]:2022'Read More…
Multiple ways to pass arguments to Python
Below is examples of passing arguments to python via regular argument assignment, and tuples and *tuples, and dictionaries and **dictionaries. Here is my gist link for it: https://gist.github.com/anonymous/271d6160cdd90a482b40 (older) Not covering all methods (forRead More…