Here is a quick command to disable your monitor in Linux.
xset dpms force off
You can bind this to a keyboard shortcut or throw it in a script to quickly send your monitors to power-save mode without waiting a timeout period.
Here are some scripts that I wrote to mount and search bulk windows machines.
mountmachines.sh
#!/bin/bash
cd /searchmachines
echo “Username please”
read username
echo “Password please”
read -s password
for machine in `cat machinelist.txt`
do
mkdir remote$machine
echo “Attempting to mount $machine…”
mount.cifs //$machine/c$ ./remote$machine -o username=$username,password=$password
done
exit
This next script searches the machines for NTUSER.DAT files to find users that were logged in during a specific time frame.
search.sh
#!/bin/bash
cd [...]
Normally my Internet connection is pretty good; but, once every couple of months, the provider changes something and my current IP address no longer works. The lease doesn’t actually expire, which is set to last 48 hours. So, I lose internet connectivity until a new renewal. It’s easy to do this by hand, but that [...]
Sometimes when a Linux system is unresponsive it seems like your only option is to hold down the power button.
Follow these key combos for a less risky reboot.
Hold Down Alt + SysRq and press R (raw keyboard mode) S (syncs disks) E (terminates all processes) I (kills the stragglers) U (read-only remount file-systems) B (reboots)
Give [...]
Hello,
Windows = Still Exists
Administration from Windows of Linux = Putty
Key-based authentication from Putty = Puttygen
Launch the key generator included with Putty called PuTTYgen.
Click Generate. Move the mouse around for some good ol random numbers.
Stick a passphrase on it if you’re feeling insecure about yourself.
Save the public key somewhere and save the private key somewhere too. [...]
This little program allows you to mount a folder on a remote system to a local folder using ssh.
Install sshfs.
$ sudo apt-get install sshfs
Use the following command to mount a folder.
$ sshfs user@remotehostname:/path/to/remote/folder /path/to/local/folder
You don’t even have to be root to mount.
You can speed the process up with key-based access.
See here. http://blog.buttewifi.com/?p=15
Here is a game that is worth your time. You even get to code it yourself.
Lolz. Needs a bash interpreter.
~$ nano guessinggame.sh
Paste this in there.
#!/bin/bash
echo “Please pick an integer between 1 and 10.”
read guess
number=0
while [ "$number" -le 1 ]
do
number=$RANDOM
let “number %= 11 ”
done
if [ $guess -eq $number ]
then
echo “You win!”
else
echo “You suck. The number was [...]