Linux I/O Redirection

Cool commands The following command saves stdout and stderr to the files “out” and “err”, respectively. [[email protected] /root]# ./cmd 1>out 2>err The following command appends stdout and stderr to the files “out” and “err”, respectively. [[email protected] /root]# ./cmd 1>>out 2>>err The following command functions similar to the above two commands, but also copies stdout and … Read more

Controlling Jobs in Linux

Starting a Job in the Background [cmd &] Attaching an ampersand to the end of a command will cause that command to run in the background. For example: [[email protected] /root]# xcalc & This command causes the xcalculator to run, also it frees up the bash prompt so you can perform other tasks. You can also … Read more

How to Capture Boot Time Error Messages

One of the easiest ways to capture boot time error messages (when no log file is present) is to use a null modem cable on the serial ports between the troubled machine and another machine. Terminology Machine #1, for these instructions, will be running Windows or Linux and will run a terminal program from which … Read more

Setting the Linux Host Name

Checking your Linux host name First, see if your host name is set correclty using the following commands: uname -n hostname -a hostname -s hostname -d hostname -f hostname If the above commands return correctly with no errors then all may be well; however, you may want to read on to verify that all settings … Read more

Using pump in Linux

Pump requests an ip address from a DHCP server. Here are several pump commands for managing dhcp ip addresses. Pump can be used to request, release, or give status on dhcp responses. pump -i eth0 –status Check the status / get details of dhcp on eth0 pump -i eth0 –release Release dhcp IP on eth0 … Read more

How to PDF Documents in Linux

Using ps2pdf in Linux There is a Linux utility called ps2pdf which will convert from a PostScript file to PDF format. The syntax for using ps2pdf is as follows: ps2pdf output.pdf You can convert a document to PostScript from Windows by installing a non-existing PostScript printer which prints to file. Using Windows and Linux … Read more

ISO, CDR, and CDRW in Linux

Creating an ISO Image Here are a couple of different commands for creating an ISO image: [[email protected] /root]# mkisofs -RJ -o image.iso /burndirectory/ [[email protected] /root]# mkisofs -J -o image.iso /burndirectory The options (-RJ) will preserve long filenames, casing and Rock Ridge extensions (long mixed-case filenames and symbolic links for *nix). -J Generate Joliet directory records … Read more

Setting the Date and Time in Linux

You have at least 2 methods for setting the date and time in Linux: You can set the time by hand, but be careful, lots of clocks tend to drift over time. The trick here to make the time stick across a reboot is to run the hwclock command as shown below You can use … Read more