you can send a process to the background of the terminal by using the bg
Saturday, July 11, 2009
More Linux useful commands
whenever you entered a command from command line and you want to do something else at the same time, you can pause the current process using ctrl+z
you can send a process to the background of the terminal by using the bg. and you set a background process into the foreground using the fg
you can send a process to the background of the terminal by using the bg
Tuesday, May 26, 2009
GDB quick note
si - step assembly instruction
s - step, or step in
n - step by line
run run the debug with arguments supplied
break and delete manages break points, it is also possible to break by condition
s - step, or step in
n - step by line
run
break and delete manages break points, it is also possible to break by condition
Wednesday, March 25, 2009
Yet another simple intro to LInux Kernel and history of X11 window manager
Linux kernel core is loaded into the directory /boot/vmlinuz-KERNEL-VERSION
additional kernel modules are loaded into /lib/modules/KERNEL-VERSION
all kernel modules can be viewed by using "lsmod" command
kernel modules can be added and removed using "modprobe", you may not remove a module if it is currently in use.
modules have parameters that you can pass to it when it is used. "modinfo" help to view to parameters. the information can also be viewed if you have the kernel source coded loaded into /usr/src
/proc/sys is a directory that contains all kernel core policies. one example is "echo 1 > /proc/sys/net/ipv4/ip_forward" modifies the ip forwarding policy to 1, thus your computer now acts as a gateway, which is useful for many man-in-the-middle attacks for stealing private information.
since linux kernel is open source, you can also modify the kernel policies freely. performance tuning is useful for running programs, such as database. oracle and IBM both provide kernel tuning page to run their database faster on linux. "sysctl -a" is a command that returns all policy documentations for the kernel.
it is very important to know that performance tuning have so many parameters, it is best you know what you're doing before changing the values.
X11 is a graphical transport layer protocol used to abstract linux window managers. this makes it possible for linux to adopt to having many different kinds of window manager without stuck with one came with the distribution. the most pro window manager for linux users is FVWM. It made it possible for linux user themselves to design their own window manager, you can make it look like anything you want, which is also welcomed by most hackers who want to have their own unique desktop style.
additional kernel modules are loaded into /lib/modules/KERNEL-VERSION
all kernel modules can be viewed by using "lsmod" command
kernel modules can be added and removed using "modprobe", you may not remove a module if it is currently in use.
modules have parameters that you can pass to it when it is used. "modinfo" help to view to parameters. the information can also be viewed if you have the kernel source coded loaded into /usr/src
/proc/sys is a directory that contains all kernel core policies. one example is "echo 1 > /proc/sys/net/ipv4/ip_forward" modifies the ip forwarding policy to 1, thus your computer now acts as a gateway, which is useful for many man-in-the-middle attacks for stealing private information.
since linux kernel is open source, you can also modify the kernel policies freely. performance tuning is useful for running programs, such as database. oracle and IBM both provide kernel tuning page to run their database faster on linux. "sysctl -a" is a command that returns all policy documentations for the kernel.
it is very important to know that performance tuning have so many parameters, it is best you know what you're doing before changing the values.
X11 is a graphical transport layer protocol used to abstract linux window managers. this makes it possible for linux to adopt to having many different kinds of window manager without stuck with one came with the distribution. the most pro window manager for linux users is FVWM. It made it possible for linux user themselves to design their own window manager, you can make it look like anything you want, which is also welcomed by most hackers who want to have their own unique desktop style.
Saturday, March 21, 2009
New Laptop, New Linux
Friday, December 12, 2008
Inama Nushif
Unfortunately, my entire Linux continuum is going to shut down for a while, as i have just lost my laptop to a backpack snacher yesterday.
As I am sitting here, thinking about my unfortunate event. I don't really know what to feel like. I do blame myself, but to how long can you hold your alert senses? you can't be invincible forever, no one can. everyone is bound to have openings at some point. Not having my new laptop feels a bit like giving up smoking for me. i just needed that speed that my old Mac can't really provide by now.
and i'm also confused about what i really want at this point, to say no to "smoking", or to get myself a new laptop, in which i could also get stolen. and i don't really know what brand to choose either, and my reason of having a new laptop is being challenged too, why do i really need a new one?
... i think i'm just gona lay low, and ponder for sometime about this... i need some time... to reborn
As I am sitting here, thinking about my unfortunate event. I don't really know what to feel like. I do blame myself, but to how long can you hold your alert senses? you can't be invincible forever, no one can. everyone is bound to have openings at some point. Not having my new laptop feels a bit like giving up smoking for me. i just needed that speed that my old Mac can't really provide by now.
and i'm also confused about what i really want at this point, to say no to "smoking", or to get myself a new laptop, in which i could also get stolen. and i don't really know what brand to choose either, and my reason of having a new laptop is being challenged too, why do i really need a new one?
... i think i'm just gona lay low, and ponder for sometime about this... i need some time... to reborn
Saturday, November 15, 2008
Java Hack: creating multiple classes within one file
I know there are plenty of people out there that don't really like java, and also plenty that do. Those that do says Java is easier to program, but the most good point is that java compilers/interpreters must follow a very strict rule of implementation, such that java code can run on any machine without a problem. now that sounds good, but Java is also a very strict programming langauge, and one the things that I have been having some problem with is they don't allow you to create multiple classes within one file, thinking that by having each file a separate class, everything looks more clear. While that is true, it also become a pain in the ass when you're dealing with a huge program with thousands of classes, which implies thousands of files, and each single one of them are listed in your Package Explorer, and some of them are so small you wonder why they have to be listed as a single file at all. so i figured out a trick to convert multiple classes in java into one file, breaking that rule.
the idea of putting multiple classes inside one is to convert a java class into what C++ refers to as a namespace, a live package that has both static and instance of itself, and putting all the other classes you want to conceal into the file as private member classes of the "namespace". This is the key idea of how to break from the one file one class rule. here is the procedure:
1. copy/create a private class inside your "namespace" class
2. write a public class generator function for each private class that is in the namespace class. the generator function will take all the arguments for the constructor and pass it to the private class constructor. it returns the instance once it is generated
3. create a public singleton instance of the namespace class. note that static instance does not work here.
and wala! now whenever you want to create a new class that is declared in the namespace class, just call the singleton instance and its generator function. and my friends, you have just turned a java class into a C++ namespace
the idea of putting multiple classes inside one is to convert a java class into what C++ refers to as a namespace, a live package that has both static and instance of itself, and putting all the other classes you want to conceal into the file as private member classes of the "namespace". This is the key idea of how to break from the one file one class rule. here is the procedure:
1. copy/create a private class inside your "namespace" class
2. write a public class generator function for each private class that is in the namespace class. the generator function will take all the arguments for the constructor and pass it to the private class constructor. it returns the instance once it is generated
3. create a public singleton instance of the namespace class. note that static instance does not work here.
and wala! now whenever you want to create a new class that is declared in the namespace class, just call the singleton instance and its generator function. and my friends, you have just turned a java class into a C++ namespace
Labels:
class,
hack,
Java,
private class,
programming,
static function
Friday, September 26, 2008
5 searching commands in linux
1. find
2. locate
-uses a database of file location instead of searching the real location, the database only updated everyday
3. whereis [-bsm]
- returns the location for a specific command line command, -b gives the location of the binary, -s gives the location of the source, and -m gives the location of the man pages
4. which
- returns all the location for the specific command. it searches the PATH env variable for locating the binary. great if there are multiple versions of a command in PATH.
- it returns the full path for each version of the command
5. type [-a]
- returns the type of command this console is using for the default, could be a shell built in, a UNIX command, a linux command etc. -a gives this property for all commands that are with the same name
2. locate
-uses a database of file location instead of searching the real location, the database only updated everyday
3. whereis [-bsm]
- returns the location for a specific command line command, -b gives the location of the binary, -s gives the location of the source, and -m gives the location of the man pages
4. which
- returns all the location for the specific command. it searches the PATH env variable for locating the binary. great if there are multiple versions of a command in PATH.
- it returns the full path for each version of the command
5. type [-a]
- returns the type of command this console is using for the default, could be a shell built in, a UNIX command, a linux command etc. -a gives this property for all commands that are with the same name
Subscribe to:
Posts (Atom)


