Booting in linux systems is faster and faster. And that's really good news. But the side effect is that when a problem occurs, you hardly have time to read the corresponding line.
Fortunately, the boot logs are stored in the following file:
/var/log/dmesg
Wednesday, April 8, 2009
Boot messages log file
Tuesday, March 31, 2009
Serve current directory tree at http://$HOSTNAME:8000/
$ python -m SimpleHTTPServer
Submitted by pixelbeat
Options:
Friday, January 16, 2009
Unmount busy cd/dvd drive
If you cannot unmount your cd/dvd drive (eject/umount commands) because it is used by a program, you can type as root:
fuser -k /media/cdrom
Monday, December 1, 2008
Delete a file safely
To prevent people from retrieving secure data you want to be deleted,
you can use the shred command:
$ shred -u -v myfile
Will erase myfile.
Simple and efficient.
Have information about a running process
I recently had to backup my hard drive using "dd".
I had 110 Go to backup and it takes a while.
Then, someone made me discover the magic command to get some information about the status of the process.
Typing in another console :
$ killall -USR1 dd
gave me all the information I need (number of Go copied, etc...).
Great tip !
Even better:
$ watch -n 10 killall -USR1 dd
will execute the command every 10 seconds.
Command line is great.
Tuesday, October 7, 2008
Log everything with shorewall
If you're using shorewall as your firewall, then this tip might be useful to you.
Sometimes, your firewall blocks some access and you do not know what happens.
To know exactly what's going on on your network, just add these lines to your /etc/shorewall/rules files:
LOG:2 net net all
LOG:2 fw net all
LOG:2 net fw all
LOG:2 fw fw all
Then, with
tail -f /var/log/messages
you will see the detailed log and will be able to fix the /etc/shorewall/rules file accordingly.
Sometimes, your firewall blocks some access and you do not know what happens.
To know exactly what's going on on your network, just add these lines to your /etc/shorewall/rules files:
LOG:2 net net all
LOG:2 fw net all
LOG:2 net fw all
LOG:2 fw fw all
Then, with
tail -f /var/log/messages
you will see the detailed log and will be able to fix the /etc/shorewall/rules file accordingly.