Thursday, January 27, 2011

mount command

Linux file system or file hierarchy is a tree structure. It starts with the root directory / and branches out to other directories. Unlike windows in linux you can change the root directory using chroot command, you probably use in the rescue mode.

Everything in linux is a file.

mount command attaches file systems. see man mount for more details.
mount -t [type] [device/source] [directory/destination]
mount -t ntfs-3g /dev/sda3 /mnt/data

mount iso image files mount -o loop /mnt/data/Videos/Expendables.iso /mnt/data
finally use umount command to detach the filesystem umount /mnt/data

access your gmail from terminal

create shell script vi gmail.sh


insert the following code :) put your username and password
!#/bin/bash
wget --secure-protocol=TLSv1 --user=sjn4me --password=123 https://mail.google.com/mail/feed/atom -O -

execute ./gmail.sh

Tuesday, January 25, 2011

resizing images in linux

copy the images to a new folder and run the following command
mogrify -resize 1280 *.JPG it means resize images 1280px wide


convert -sample 80x40 input.jpg output.jpg
convert -sample 25%x25% input.jpg output.jpg


for img in `ls *.jpg`
do
convert -sample 25%x25% $img thumb-$img
done


rotate images convert -rotate 90 input.jpg output.jpg


convert to different formats convert input.jpg output.png


add a text label 
convert -font helvetica -fill white -pointsize 36 -draw 'text 10,50 "Floriade 2002, Canberra, Australia"' floriade.jpg comment.jpg
convert -font fonts/1900805.ttf -fill white -pointsize 36 -draw 'text 10,475 "jeromenicholas.co.cc"' floriade.jpg stillhq.jpg


get information on tiff files tiffinfo sample.tif
get information on png files pnginfo sample.png


add a charcoal effect convert -charcoal 2 input.jpg output.jpg
colorize effect convert -colorize 255 input.jpg output.jpg


convert -implode 4 input.jpg output.jpg
convert -solarize 42 input.jpg output.jpg
convert -spread 5 input.jpg output.jpg


multiple commands convert -sample 25%x25% -spread 4 \ -charcoal 4 input.jpg output.jpg


http://www.imagemagick.org/

Thursday, January 20, 2011

Installing mysql on Fedora 13

Installing mysql Fedora 13 - Goddard

change user to root su -
yum install mysql
yum install mysql-server
yum install mysql-devel

after installation.. files will be available on /var/lib/mysql
and user group called mysql will be created.. change the group ownership and permissions
chgrp -R mysql /var/lib/mysql/
chmod -R 770 /var/lib/mysql/

the next step is not necessary.. add the service in desired runlevel
chkconfig | grep mysqld
chkconfig mysqld on

start the service service mysqld start
set the passwords. (note single quote is important)
mysqladmin -u root password 'new-password'
mysqladmin -u root -h hostname password '
new-password'
login to mysql mysql -u root -p

show databases;
use mysql;
show tables;
describe user;
select user, password, host from user;
update user set password = '******' where user = 'root' and host = '127.0.0.1';

Wednesday, September 15, 2010

ways to diasble rm in fedora


[jerome@localhost ~]$ vi /home/jerome/.bashrc
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi


# User specific aliases and functions
alias rm='echo command disabled for file '

Tuesday, September 14, 2010

Fix Windows 7 boot loader

boot your system with Windows 7 DVD
when you get to the second screen (after you choose your language) go to repair your computer.
go to command prompt and type this in without the quotes (") :
"bootrec /fixmbr"
press enter.
Type this in without the quotes (") :
"bootrec /FixBoot"
press enter.
Restart.

Thursday, August 12, 2010

proxy

Proxify http://proxify.com/
Anonymouse http://anonymouse.org/anonwww.html
IPHide http://iphide.com/

heres a list of free web-based proxy servers

http://www.prospector.cz/Free-Intern...ces/Web-proxy/

windows tips

use onscreen keyboard
start > run > osk
----- ----- ----- ----- ----- ----- -----
windows version
start > run > winver
----- ----- ----- ----- ----- ----- -----
windows host file
C:\WINDOWS\SYSTEM32\DRIVERS\ETC

127.0.0.1 myspace.com
----- ----- ----- ----- ----- ----- -----
network connections
start >run > ncpa.cpl
appwiz.cpl -- Used to run Add/Remove wizard
Calc --Calculator
Cfgwiz32 --ISDN Configuration Wizard
Charmap --Character Map
Chkdisk --Repair damaged files
Cleanmgr --Cleans up hard drives
Clipbrd --Windows Clipboard viewer
Control --Displays Control Panel
Cmd --Opens a new Command Window
Control mouse --Used to control mouse properties
Dcomcnfg --DCOM user security
Debug --Assembly language programming tool
Defrag --Defragmentation tool
Drwatson --Records programs crash & snapshots
Dxdiag --DirectX Diagnostic Utility
Explorer --Windows Explorer
Fontview --Graphical font viewer
Fsmgmt.msc -- Used to open shared folders
Firewall.cpl -- Used to configure windows firewall
Ftp -ftp.exe program
Hostname --Returns Computer's name
Hdwwiz.cpl -- Used to run Add Hardware wizard
Ipconfig --Displays IP configuration for all network adapters
Logoff -- Used to logoff the computer
MMC --Microsoft Management Console
Msconfig --Configuration to edit startup files
Mstsc -- Used to access remote desktop
Mrc -- Malicious Software Removal Tool
Msinfo32 --Microsoft System Information Utility
Nbtstat --Displays stats and current connections using NetBIOS over TCP/IP
Netstat --Displays all active network connections
Nslookup--Returns your local DNS server
Osk ---Used to access on screen keyboard
Perfmon.msc -- Used to configure the performance of Monitor.
Ping --Sends data to a specified host/IP
Powercfg.cpl -- Used to configure power option
Regedit --Registry Editor
Regwiz -- Registration wizard
Sfc /scannow -- System File Checker
Sndrec32 --Sound Recorder
Shutdown -- Used to shutdown the windows
Spider -- Used to open spider solitaire card game
Sfc / scannow -- Used to run system file checker utility.
Sndvol32 --Volume control for soundcard
Sysedit -- Edit system startup files
Taskmgr --Task manager
Telephon.cpl -- Used to configure modem options.
Telnet --Telnet program
Tracert --Traces and displays all paths required to reach an internet host
Winchat -- Used to chat with Microsoft
Wmplayer -- Used to run Windows Media player
Wab -- Used to open Windows address Book.
WinWord -- Used to open Microsoft word
Winipcfg --Displays IP configuration
Winver -- Used to check Windows Version
Wupdmgr --Takes you to Microsoft Windows Update
Write -- Used to open WordPad

Monday, July 19, 2010

RedHat Enterprise on Virtual PC Graphics Problem

there is a distorted graphics problem if you are Red Hat Enterprise 5 Edition on Microsoft Virtual PC 2007 running on Windows 7(I am using the Professional Edition)

you need to modify the X Server configuration file and change the default display depth to 16 bits

most Linux distributions support 24 bit colour,
which MVPC doesn't support(only 16 bit colours)

ALT + F2
type
gnome-terminal ans press RUN
[root@localhost ~]#ls -ltr /etc/X11/xorg.conf
[root@localhost ~]#vi /etc/X11/xorg.conf

change the following..

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
DefaultDepth 16
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
EndSection

About

Blogger templates