Get system info and record it to a file:You need to create a separate file of all the urls of your instructables.

echo “=================================”
cat /etc/hostname
echo “getting stats”
file=”system.txt”
echo ” ” > $file
echo “=====================================” >> $file
echo get computername >> $file
cat /etc/hostname >> $file
echo “=====================================” >> $file
echo get current ip connections >> $file
sudo ifconfig >> $file
echo “————————————-” >> $file
echo get linux version >> $file
lsb_release -a >> $file
echo “————————————-” >> $file
echo get memory specs >> $file
free >> $file
echo “————————————-” >> $file
echo get file storage statistics >> $file
df -h >> $file
echo “————————————-” >> $file
echo get pci specs >> $file
sudo lspci >> $file
echo “————————————-” >> $file
echo get loaded modules >> $file
sudo lsmod >> $file
echo “————————————-” >> $file
echo get current usb attachments. >> $file
sudo lsusb >> $file
echo “————————————-” >> $file
echo get repos >> $file
cat /etc/apt/sources.list >> $file
echo “————————————-” >> $file
echo get installed software >> $file
sudo dpkg –get-selections >> $file
echo “————————————-” >> $file
echo get hardware info >> $file
sudo lshw >> $file
echo “————————————-” >> $file
echo get scsi devices >> $file
sudo lsscsi >> $file
echo “————————————-” >> $file
cat /etc/issue >> $file
echo “————————————-” >> $file
echo get boot up info >> $file
dmesg >> $file
echo “————————————-” >> $file
echo get users >> $file
cat /etc/passwd >> $file
echo “————————————-” >> $file
echo get current users on system >> $file
who >> $file
echo “————————————-” >> $file
echo get system messages >> $file
cat /var/log/messages >> $file
echo “————————————-” >> $file
echo get rootkit checker log >> $file
cat /var/log/rkhunter.log >> $file
echo “————————————-” >> $file
echo get syslog >> $file
cat /var/log/syslog >> $file
echo “————————————-” >> $file
echo get scheduled events >> $file
cat /etc/anacrontab >> $file
cat /etc/crontab >> $file

——————————————————–

Get http://www.instructable.com views.

#================================
#
# Instructablesnumbers catcher
#
#=================================
# Assignments
# ——————————–
szAnswer=$(zenity –file-selection –title=”Select a iurl file to read”)
datafile=$szAnswer
outfile=”inumdata”
# the date
tmon=$(date +”%b”)
tday=$(date +”%d”)
echo “The views for $dj on $tmon $tday:” > $outfile
#=================================
#
# Data input
#———————————
while read line
do theurl=$line
echo “$theurl”
# echo -n “$theurl'” >> $outfile
# get total views
curl -s “$theurl” | grep “hits-count” | sed ‘s/[^0-9]*//g’ >> $outfile
done < $datafile
zenity –text-info –filename=$outfile

—————————————————–

Quickie webserver for MSwindows.

You will need to get and install python for you MSWindows.
You will want to go to http://www.python.org/download/ and download the version for your system and http://www.python.org/download/windows/ for more downloads.
Please use their instructions for installing the product. Also contact them if you need help with it.

Assuming you now have python installed, go to the command prompt  and type ipconfig so you know what address to put in the url of the other computer. Write or make note of the address.
Then change to the directory you want to serve. I just used the root directory and typed:

c:\python -m SimpleHTTPServer 8080

You are in business.

Now you want to go to the machine you want to download the files to.

1. Open up your web browser and type In the url type in the ipaddress you found in the last step with :8080 added on the end, then press enter (that is just the port being used instead of the usual port 80.)

xxx.xxx.xxx.xxx:8080

or

http://xxx.xxx.xxx.xxx:8080

2. You should see the directory of the host computer. if there is an index.htm(l) file in that directory it will be displayed instead of the directory. (you will need to rename it if you just want to download files.

Viola, you done. Now you can download files if you need to.

——————————————————————————–

Pasta al pesto.

Good day.

Advertisements