Complex : Part Reality and Part Imagination
Wednesday, May 30, 2012
Monday, April 23, 2012
Sunday, April 22, 2012
Tuesday, April 10, 2012
Saturday, September 17, 2011
Friday, August 12, 2011
Sunday, August 7, 2011
Steps for installing ddd on linux for beginners
Download source code from ddd site and save it. It gets saved in Desktop
Move it to /usr/src
Untar it
Download source code for lesstif
Move it to /usr/src
Untar it
Go to lesstif dir
./configure
Make
Make install
Go to ddd dir
./configure
Make
Make install
Ldconfig /usr/local/lib
ddd
Some useful Linux commands I came across as a beginner and documented for future use
Registering copy of red hat enterprise linux
rhn_register
To extract tar.gz file in cygwin
gunzip -d httpd-2_0_NN.tar.gz
tar xvf httpd-2_0_NN.tar
Cygwin commands
Cygcheck -s
Whereis boost
Cygpath ==> to get corresponding linux path
Cygpath --windows ==> to get corresponding windows path
SVN
svn checkout (or just co) http://xx.xx.xx.xxx/x/xx/trunk /root/xxx/
Svn status ------> to find all the modified files
svn copy http://xx.xx.xx.xxx/x/xx/trunk http://xx.xx.xx.xxx/x/xx/trunk2 -m "comment"
svn info http://xx.xx.xx.xxx/x/xx/trunk
Grep commands
grep -iR "" *.* -------> find the text in all the files with ignore case and recursively in subdir
Linux machine access remotely from windows machine
Installing xRDP: http://www.fedoraforum.org/forum/showthread.php?t=193101
Commands for SSH via cygwin:
$ xwin –ac –resize &
$ DISPLAY=:0 ssh –CXYtf root@xxx.xx.xx.xxx /usr/bin/gnome-session
To get OS configuration
uname -a
Shutdown linux box
Shutdown -h now
Reboot
Current directory
pwd
To start GUI
Startx
Tty?
To copy file remotely (secure copy = scp)
scp root@xxx.xx.xx.xx:/home/xxx/desheu1.tar.gz .
Super user
Su-
Install using super user account
Sudo Yup install xrdp
Sudo Yup install screen
To list running processes and killing one process
Ps -ef | grep "firefox"
Kill -9
To clear the terminal screen
Clear
Installing Java
Yum install java
To find where is the package installed
Type screen
Which screen
Find / screen
listing all the scsi devices on linux box
lsscsi: to list the scsi devices on the local system
>yum install lsscsi
>lsscsi
equivalent on windows is diskpart.exe with LIST DISK command
installing sg_utils
yum install sg_utils
The list of sg utils can be found at http://sg.danny.cz/sg/sg3_utils.html. You can also download the utilties on windows from this site. Utils i tried and which works on both Windows and Linux are like
sg_scan
Some commands to explore
top : similar to task manager in windows
dd: create large files
man (page 1: bash commands, page 2: system calls, page 3: CLIs etc)
ldd: list dependant modules - static list read from a dll or exe
lsmod: list loaded kernel modules
grep, e(xtended)grep and f(ast)grep : to find substrings from a file using regex
find: to find files with regex
ulimit: http://justlearningtoblog.wordpress.com/2010/07/23/enable-core-dump-files-in-fedora/
ifconfig to get the ip and mac address
strace
ptree
df -ah : to check the disk free
du -ah: to list disk usage
mount : to list all the mounted fs
Some questions to answer:
Where does the core dump go for deamons vs CLIs?
http://justlearningtoblog.wordpress.com/2010/07/23/enable-core-dump-files-in-fedora/
shared memory/mapped files/pipes on linux
system calls (fopen vs open)
How to check the list of dynamically loaded libraries in a live process? lsof -p
(
http://www.akadia.com/services/lsof_intro.html
http://www.unix.com/programming/34498-how-view-loaded-shared-libraries-running-processes-linux.html)
Some cheet sheet for commands:
http://www.pixelbeat.org/cmdline.html
Basic vi editor commands
y - copy
h j k l - arrow left, down, up, right (respectvely)
yy - copy one line
p - paste
:buffers - to list the buffers copied in clipboard
yw - copy one word
yn - copy n lines
ynw - copy n words
0 - go to the start of the line
y0 - copy from current cursor till start of line
$ - go to end of line
y$ - copy from current cursor to end of line
u - undo
dd - delete one line
dj - delete current and line below current line (remember j is the arrow down command)
guu - lowercase
gUU - uppercase
listing all the scsi devices on linux box
lsscsi: to list the scsi devices on the local system
>yum install lsscsi
>lsscsi
equivalent on windows is diskpart.exe with LIST DISK command
installing sg_utils
yum install sg_utils
The list of sg utils can be found at http://sg.danny.cz/sg/sg3_utils.html. You can also download the utilties on windows from this site. Utils i tried and which works on both Windows and Linux are like
sg_scan
Some commands to explore
top : similar to task manager in windows
dd: create large files
man (page 1: bash commands, page 2: system calls, page 3: CLIs etc)
ldd: list dependant modules - static list read from a dll or exe
lsmod: list loaded kernel modules
grep, e(xtended)grep and f(ast)grep : to find substrings from a file using regex
find: to find files with regex
ulimit: http://justlearningtoblog.wordpress.com/2010/07/23/enable-core-dump-files-in-fedora/
ifconfig to get the ip and mac address
strace
ptree
df -ah : to check the disk free
du -ah: to list disk usage
mount : to list all the mounted fs
Some questions to answer:
Where does the core dump go for deamons vs CLIs?
http://justlearningtoblog.wordpress.com/2010/07/23/enable-core-dump-files-in-fedora/
shared memory/mapped files/pipes on linux
system calls (fopen vs open)
How to check the list of dynamically loaded libraries in a live process? lsof -p
(
http://www.akadia.com/services/lsof_intro.html
http://www.unix.com/programming/34498-how-view-loaded-shared-libraries-running-processes-linux.html)
Some cheet sheet for commands:
http://www.pixelbeat.org/cmdline.html
Basic vi editor commands
y - copy
h j k l - arrow left, down, up, right (respectvely)
yy - copy one line
p - paste
:buffers - to list the buffers copied in clipboard
yw - copy one word
yn - copy n lines
ynw - copy n words
0 - go to the start of the line
y0 - copy from current cursor till start of line
$ - go to end of line
y$ - copy from current cursor to end of line
u - undo
dd - delete one line
dj - delete current and line below current line (remember j is the arrow down command)
guu - lowercase
gUU - uppercase
Subscribe to:
Posts (Atom)