ubuntu@ubuntu:/mnt$ sudo mount -t ext3 /dev/md0 /mnt/md0
mount: wrong fs type, bad option, bad superblock on /dev/md0,
missing codepage or other error
(could this be the IDE device where you in fact use
ide-scsi so that sr0 or sda or so is needed?)
In some cases useful info is found in syslog - try
dmesg | tail or so
$ sudo mdadm –assemble /dev/md0 /dev/sdd /dev/sdb /dev/sdc
mdadm: /dev/md0 has been started with 3 drives.
$sudo mount /dev/md0 /data/
OR….
Simply run this command.
mdadm --detail --scan >> /etc/mdadm/mdadm.conf
Mount again and all should work!
Uncategorized
import MySQLdb
data="jeremiah's new laptop"
data=MySQLdb.escape_string(data)
cursor.execut("INSERT INTO table1 name VALUES (data);")
Python
import sys, socket
hostname = socket.gethostname()
print "Host name:", hostname
Uncategorized
import MySQLdb #python-mysqldb
conn = MySQLdb.connect (host = "localhost", user = "root", passwd = mysql_pass, db = "")
cursor = conn.cursor ()
cursor.execute("use database")
Python
#!/usr/bin/python
import csv
import MySQLdb
spamReader = csv.reader(open('eggs.csv'), delimiter=' ', quotechar='|')
for row in spamReader:
print ' '.join(row)
Python
csv
To create an image (link to a more verbose explanation) use dd on an unmounted CD/DVD drive:
dd if=/dev/cd of=cd.iso
Uncategorized
add command to the bottom of the .bashrc file
alias cvsu='cvs -q update -P -d'
$source ~/.bashrc
now run the new command
$ cvsu
Uncategorized
When displaying numbers on a web page make sure that you right justify the data for use of decimals.
For example, if left justifying data your table will look like this…
100.50
324.34
.25
5.34
When right justified it looks better and your decimals line up.
100.00
.25
5.67
Linux