Wednesday, April 9, 2008

Need Giftcards or Rapidshare accounts for low price?

Here is a good offer for my readers.If anybody need rapidshare accounts,itunes giftcards,amazon giftcards etc for low price, contact sellser@yahoo.com.
You can get products at nearly half of original price..Enjoy the offer!!

Monday, November 19, 2007

10 Linux commands you’ve never used


It takes years maybe decades to master the commands available to you at the Linux shell prompt. Here are 10 that
you will have never heard of or used. They are in no particular order. My favorite is mkfifo.
1.

pgrep, instead of:

# ps -ef egrep '^root ' awk '{print $2}'
1
2
3
4
5
20
21
38
39
...
You can do this:
# pgrep -u root
1
2
3
4
5
20
21
38
39
...


2. pstree, list the processes in a tree format. This can be VERY useful when working with WebSphere or other heavy duty applications.

# pstree
init-+-acpid
-atd
-crond
-cups-config-dae
-cupsd
-dbus-daemon-1
-dhclient
-events/0-+-aio/0
-kacpid
-kauditd
-kblockd/0
-khelper
-kmirrord
`-2*[pdflush]
-gpm
-hald
-khubd
-2*[kjournald]
-klogd
-kseriod
-ksoftirqd/0
-kswapd0
-login---bash
-5*[mingetty]
-portmap
-rpc.idmapd
-rpc.statd
-2*[sendmail]
-smartd
-sshd---sshd---bash---pstree
-syslogd
-udevd
-vsftpd
-xfs
`-xinetd


3. bc is an arbitrary precision calculator language. Which is great. I found it useful in that it can perform square root operations in shell scripts. expr does not support square roots.

# ./sqrt
Usage: sqrt number
# ./sqrt 64
8
# ./sqrt 132112
363
# ./sqrt 1321121321
36347
Here is the script:
# cat sqrt
#!/bin/bash
if [ $# -ne 1 ]
then
echo 'Usage: sqrt number'
exit 1
else
echo -e "sqrt($1)\nquit\n" bc -q -i
fi


4. split, have a large file that you need to split into smaller chucks? A mysqldump maybe? split is your command. Below I split a 250MB file into 2 megabyte chunks all starting with the prefix LF_.

# ls -lh largefile
-rw-r--r-- 1 root root 251M Feb 19 10:27 largefile
# split -b 2m largefile LF_
# ls -lh LF_* head -n 5
-rw-r--r-- 1 root root 2.0M Feb 19 10:29 LF_aa
-rw-r--r-- 1 root root 2.0M Feb 19 10:29 LF_ab
-rw-r--r-- 1 root root 2.0M Feb 19 10:29 LF_ac
-rw-r--r-- 1 root root 2.0M Feb 19 10:29 LF_ad
-rw-r--r-- 1 root root 2.0M Feb 19 10:29 LF_ae
# ls -lh LF_* wc -l
126


5. nl numbers lines. I had a script doing this for me for years until I found out about nl.

# head wireless.h
/*
* This file define a set of standard wireless extensions
*
* Version : 20 17.2.06
*
* Authors : Jean Tourrilhes - HPL
* Copyright (c) 1997-2006 Jean Tourrilhes, All Rights Reserved.
*/#ifndef _LINUX_WIRELESS_H
# nl wireless.h head
1 /*
2 * This file define a set of standard wireless extensions
3 *
4 * Version : 20 17.2.06
5 *
6 * Authors : Jean Tourrilhes - HPL
7 * Copyright (c) 1997-2006 Jean Tourrilhes, All Rights Reserved.
8 */9 #ifndef _LINUX_WIRELESS_H

6. mkfifo is the coolest one. Sure you know how to create a pipeline piping the output of grep to less or maybe even perl. But do you know how to make two commands communicate through a named pipe?First let me create the pipe and start writing to it:

Then read from it:




7. ldd, want to know which Linux thread library java is linked to?

# ldd /usr/java/jre1.5.0_11/bin/java
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00bd4000)
libdl.so.2 => /lib/libdl.so.2 (0x00b87000)
libc.so.6 => /lib/tls/libc.so.6 (0x00a5a000)
/lib/ld-linux.so.2 (0x00a3c000)


8. col, want to save man pages as plain text?

# PAGER=cat
# man less col -b > less.txt


9. xmlwf, need to know if a XML document is well formed? (A configuration file maybe..)

# curl -s 'http://bashcurescancer.com' > bcc.html
# xmlwf bcc.html
# perl -i -pe 's@
@
@g' bcc.html
# xmlwf bcc.html
bcc.html:104:2: mismatched tag


10. lsof lists open files. You can do all kinds of cool things with this. Like find which ports are open:

# lsof grep TCP
portmap 2587 rpc 4u IPv4 5544 TCP *:sunrpc (LISTEN)
rpc.statd 2606 root 6u IPv4 5585 TCP *:668 (LISTEN)
sshd 2788 root 3u IPv6 5991 TCP *:ssh (LISTEN)
sendmail 2843 root 4u IPv4 6160 TCP badhd:smtp (LISTEN)
vsftpd 9337 root 3u IPv4 34949 TCP *:ftp (LISTEN)
cupsd 16459 root 0u IPv4 41061 TCP badhd:ipp (LISTEN)
sshd 16892 root 3u IPv6 61003 TCP badhd.mshome.net:ssh->kontiki.mshome.net:4661 (ESTABLISHED)
Note: OpenBSD 101 pointed out that “lsof -i TCP” a better way to obtain this same information. Thanks!Or find the number of open files a user has. Very important for running big applications like Oracle, DB2, or WebSphere:


# lsof grep ' root ' awk '{print $NF}' sort uniq wc -l
179


Note: an anonymous commenter pointed out that you can replace sort uniq with “sort -u”. This is true, I forgot about the -u flag. Thanks!


Wednesday, October 31, 2007

Mod-less Xbox Linux!

Folks at The Xbox Linux Project have gotten Linux to run on an un-modified Microsoft Xbox. In fact, you don’t even have to open the Xbox up to boot and install the Xbox Linux Live Plugin Distribution. All it involves is to install a small savegame.

The Xbox is a legacy-free PC by Microsoft that consists of an Intel Celeron 733 MHz CPU, an nVidia GeForce 3MX, 64 MB of RAM, a 8/10 GB hard disk, a DVD drive and 10/100 Ethernet. As on every PC, you can run Linux on it.

An Xbox with Linux can be a full desktop computer with mouse and keyboard, a web/email box connected to TV, a server or router or a node in a cluster. You can either dual-boot or use Linux only; in the latter case, you can replace both IDE devices. And yes, you can connect the Xbox to a VGA monitor.

Can't do it yourself? We can install Linux on your Xbox - for free!Use this guide for fast installation

Sunday, October 28, 2007

Amazing 3D view of linux kernels..


linux-1.2.0

linux-2.4.1

A guided tour of Linux-2.4.5: 9 MB MPEG (384x288, 2000 frames).

From 1.2.0 to 2.4.1: 12 MB MPEG (384x288, 1400 frames).
From 1.2.0 to 2.4.1: 4 MB MPEG (320x240, 1200 frames, low motion).

These are 3D renderings of dependencies in the Linux kernel source code.

Grey boxes are files.
The green tree is the directory structure. The two main hubs are "fs" and "net". The "drivers" tree is not rendered.
Blue lines are function dependencies.
Red lines are variable dependencies.
Yellow flashes show file size modifications.
Green flashes show files being moved across directories.
Red flashes show new files.


How this is done

For each kernel source tree, C files are preprocessed and parsed. Functions and static variables are cross-referenced. The resulting data structures (about 1MB each) are written to disk before rendering.
This takes up to 15 minutes for a recent kernel.
Some C files are excluded manually:
files which do not belong in the kernel (gentbl.c, skeleton.c, scripts, tools, ...)
arch/alpha, ... (only i386)
architecture-dependent drivers
C files which are #include'd (mmap_avl.c, ...).
Layout is done with trivial spring-based techniques. Links are weighted according to how often functions are used. This is why kernel/printk.c, kernel/sched.c etc get placed outside the core.
Color effects are computed by diff'ing successive versions.
The custom 3D renderer uses transparency effects rather than polygons and textures. It runs at interactive frame rates on small kernels.


Limitations

Timing currently reflects version numbers, not release dates.
Some structure information (e.g. macros) is lost through preprocessing.
Dependencies in __asm__ arguments are ignored.
Preprocessing errors and warnings are ignored.
CFLAGS in local Makefiles are ignored.
Some files in old kernels used to include headers from /usr/include (e.g. stdio.h). They are not processed correctly.
Some drivers won't compile without a proper combination of CONFIG_ #defines. They are not processed correctly.
The parser might be buggy because of unconventional side-effects and remaining reduce/reduce conflicts (i.e. I haven't tested it for any other application).


Interesting facts

There are files with CR/LF carriage returns in some old kernels.
Parsing C is fun. The following code demonstrates exciting features of GNU C used in old versions of Linux:
int a, b;
typedef int t, u;
void f1() { a * b; }
void f2() { t * u; }
void f3() { t * b; }
void f4() { int t; t * b; }
void f5(t u, unsigned t) {
switch ( t ) {
case 0: if ( u )
default: return;
}
}

iPod-powered DJ console runs Linux

Numark is shipping the iDJ2, a Linux-based DJ mixing console built around the Apple iPod. The iDJ2 allows users to play two songs simultaneously from a single iPod, and offers music control with real-time scratching, pitch control, seamless loop, and full cueing.
Spread the word:
digg this story


According to Numark, which bills itself as the world's leading manufacturer of products for the DJ market, DJs can hook up additional iPods, thumb drives, external USB hard drives, and other storage devices via rear-panel USB ports. Line inputs are available for a variety of audio sources, and the system uses pro-grade, balanced XLR or stereo RCA output.


Several views of the Numark iDJ2


DJs interact with the system via a graphical application displayed on a built-in color screen. Visual track-profiling enables DJs to easily manage music libraries, says Numark, and the Crate feature lets DJs queue music in a playlist and reorder songs on the fly. iDJ2 supports multiple file formats including MP3, WAV, and AAC (non-DRM). DJs can also record their performances to an iPod or connected drive.


iDJ2's Crate feature

Numark declined to disclose details of the iDJ2's embedded processor, memory, and other basic specs, but did offer the following feature list:
Large backlit, full-color display
Key-lock support for maintaining key while tempo shifting
Universal Dock for iPod with adjustable mount
Two large jog wheels with search, looping, pitch control, and scratching
Visual track profiles to skip through phrases
USB ports for iPods, thumb drives and hard drives
Play music from two iPods simultaneously, including two songs from same iPod
Scratching and mixing for MP3, WAV, and AAC (unprotected) files
Playback of iTunes music store (protected AAC) files
Pitch control with range up to +25% and down to 100%
USB keyboard support
Three–band EQ with gain control on both channels
Dedicated microphone input with tone and level control
Phono/line inputs on both channels for adding additional devices

Built on an in-house Linux 2.6.10 implementation, the iDJ2 makes use of a number of well-known open source packages, including RedBoot, BusyBox, uDev, and glibc. For development purposes Numark runs the application on an x86 Linux box with a QT front end, and it has also been tested to run under Cygwin on Windows, the company said.

D2 Director

In March, Numark introduced another Linux-based device called the D2 Director (shown below). The company describes the rack-mountable console as "a live performance digital media player with extreme portability." It uses USB for storage.


Several views the D2 Director


Why Linux?

Rob Voisey, director of engineering for the Numark iDJ2 development team in Cambridge, U.K., told LinuxDevices that the company "chose Linux for its powerful real-time threading model, comprehensive driver support, access to source code, and wide availability of expertise." He also commented that his team "includes many of the pioneers of embedded Linux for audio applications."

Linux OS source code is available for download from Numark's website, here, although the main application is closed source.

Availability

Numark's iDJ2 is available now for a suggested list price of about $800 and and street prices around $600. The earlier-introduced D2 Director appears to have street prices around $500.

Wednesday, October 10, 2007

Linspire 6.0 Desktop Linux Operating System Released!

San Diego, CA - October 10th, 2007 - Linspire, Inc., developer of the Linspire commercial and Freespire community desktop Linux operating systems and CNR.com, a free Linux software delivery service, today announced the immediate availability of Linspire 6.0, the latest commercial release of the desktop Linux operating system. Building on the best of open source software using Ubuntu as its base line, Linspire 6.0 adds licensed proprietary drivers, codecs, and software in its core distribution to provide a better user experience. The first commercial release from Linspire, Inc. in over two years, Linspire 6.0 continues its traditional focus on ease-of-use and bundles proprietary software where there are no viable open source alternatives, providing improved hardware, file type, and multimedia support, such as MP3, Real, Java, Flash, ATI, nVidia, WiFi, and many more. Linspire 6.0 is also the first commercial release to incorporate several technologies from Microsoft including Windows Media, True Type Fonts, as well as Open XML translators that allow OpenOffice to open and edit Microsoft Word .docx formatted documents.

"Today we continue the Linspire tradition by offering the choice of a better overall experience for users new to desktop Linux," said Larry Kettler, President and CEO of Linspire, Inc. "Linspire 6.0 further bridges the gap between open source and commercial software, combining the best from each into a single easy-to-use, familiar and productive operating system."

Linspire 6.0 is the first desktop Linux operating system to bundle the CNR Client (beta), providing one-click access to thousands of open source and popular commercial applications such as Sun's StarOffice, Parallels Workstation, Win4Lin, CodeWeaver's Crossover Office, TransGaming's Cedega, commercial games and many more.

"If you are genuinely interested in finding an OS alternative, Linspire 6.0 will show you how far desktop Linux has come" continued Kettler. "We have put everything into this latest commercial release to make it our most complete offering to date."

Linspire 6.0 begins with Ubuntu (Version 7.04) as its base line and then adds software from six broad categories, further expanding Linspire's capabilities:

CNR Client (beta) provides free one-click access to thousands of open source applications, as well as commercial software such as Sun's StarOffice, Parallels Workstation, Win4Lin, CodeWeaver's Crossover Office, TransGaming's Cedega, commercial games and many more. Linspire 6.0 users will be able to automatically update the CNR Client when future versions are released.

KDE is added for an easier-to-use and more comfortable interface, with a more familiar look and feel for Apple Mac and Microsoft Windows users.

Enhanced applications
and features are added for superior usability and ease of use, modifying software applications such as Firefox and Thunderbird, and along with the inclusion of Linspire-sponsored open source software like Lsongs and Lphoto.

Proprietary software
is added when necessary, such as Java, Flash, and Adobe Acrobat, in order to provide overall increased interoperability and enhanced user experience.

Proprietary codecs are added to expand multimedia compatibility and provide a superior overall computing experience so users can listen to MP3 files, play Windows Media files and much more.

Proprietary drivers
are added to expand hardware compatibility and provide optimum 3D graphic card support, better WiFi support, and more.

Version 6.0 is also the first commercial offering from Linspire to provide customers with Microsoft patent covenants. In June of 2007, Linspire and Microsoft entered into a broad interoperability and technical collaboration agreement to facilitate interoperability between Windows and Linspire, which included intellectual property assurances. The agreement promotes customer choice and strengthens the bridge between the Microsoft® Windows® and Linux operating systems.

For a detailed list of Linspire 6.0 features, please visit http://www.linspire.com/newfeatures.

Availability and Pricing:
Linspire 6.0 is available immediately via digital download at http://www.linspire.com/buylinspire for $49.95. For more information or to purchase Linspire 6.0, please visit http://www.linspire.com.

About Linspire
Linspire, Inc. (http://www.linspire.com) was founded in 2001 to bring choice into the operating system market. The company's flagship product, the Linspire operating system, is an affordable, easy-to-use Linux-based operating system distributed primarily pre-installed on PCs for home, school, and business users. Freespire ( http://www.freespire.org) is a community-involved, Linux-based operating system that combines the best that free, open source software has to offer (community driven, freely distributed, open source code, etc.), but also provides users the choice of including proprietary codecs, drivers and applications as they see fit. With Freespire, the choice is yours as to what software is installed on your computer, with no limitations or restrictions placed on that choice. How you choose to maximize the performance of your computer is entirely up to you. Linspire also pioneered CNR Technology, which provides free access to all Linux software through CNR.com, allowing one-click installation from over 20,000 software programs, packages and libraries. Free to use, both free & commercial software is available at CNR.com (http://www.cnr.com).