Monday, July 27, 2009

Philips Xenium X650 “Long Life” Slider

Philips Xenium X650 “Long Life” Slider

Posted: 26 Jul 2009 02:16 AM PDT

Philips Xenium X650 Long Life Slider

We’ve seen the Xenium X830 that offers a 1.5 month standby time, here comes another “long life” Xenium, the X650 that can standby for about a month.

Philips Xenium X650  Long Life Slider slide out

The Xenium X650 is a slider phone with a 2.4-inch 240×320 LCD display, a 3.2 Megapixel auto focus camera, Bluetooth and FM radio tuner. The phone has 30MB internal memory and a microSD card slot. It supports quad-band GSM/GPRS networks and lack 3G support. As the Chinese shown on its screen, the X650 is probably targeted at China market.

Wednesday, June 3, 2009

UNIX / Linux Command Summary

UNIX / Linux Command Summary

access()
Used to check the accessibility of files

int
Access(pathname, access_mode)
Char* pathname;
int access-mode;
The access modes are.
04 read
02 write
01 execute (search)
00 checks existence of a file

& operator
execute a command as a background process.

banner
prints the specified string in large letters. Each argument may be upto 10 characters long.

break
is used to break out of a loop. It does not exit from the program.

Cal
Produces a calender of the current month as standard output. The month (1-12) and year (1-9999) must be specified in full numeric format.

Cal [[ month] year]

Calendar
Displays contents of the calendar file

case operator
The case operator is used to validate multiple conditions.

Case $string in

Pattern 1)
Command list;;
Command list;;

Pattern 3)
Command list;;
easc

cat
(for concatenate) command is used to display the contents of a file. Used without arguments it takes input from standard input is used to terminate input.

cat [filename(s)]
cat > [filename]
Data can be appended to a file using >>

Some of the available options are :
Cat [-options] filename(S)
-s silent about files that
cannot be accessed
-v enables display of non printinging characters (except tabs, new lines, form-

feeds)
-t when used with –v, it causes tabs to be printed as ^I’s
-e when used with –v, it causes $ to be printed at the end of each line
The –t and –e options are ignored if the –v options is not specified.

cd
Used to change directories

chgrp
Changes the group that owns a file.
Chgrp [grou –id] [filename]

chmod
Allows file permissions to be changed for each user. File permissions can be changed only by the owner (s).
Chmod [+/-][rwx] [ugo] [filename]

chown
Used to change the owner of a file.
The command takes a file(s) as source files and the login id of another user as the target.
Chown [user-id] [filename]

cmp
The cmp command compares two files (text or binary) byte-by-byte and displays the first occurrence where the files differ.
Cmp [filename1] [filename2] -1 gives a long listing

comm.
The comm command compares two sorted files and displays the instances that are common. The display is separated into 3 columns.
Comm. filename1 filename2
first displays what occurs in first files but not in the second
second displays what occurs in second file but not in first
third displays what is common in both files

continue statement
The rest of the commands in the loop are ignored. It moves out of the loop and moves on the next cycle.

cp
The cp (copy) command is used to copy a file.
Cp [filename1] [filename2]

cpio(copy input/output)
Utility program used to take backups.
Cpio operates in three modes:
-o output
-i input
-p pass

creat()
the system call creates a new file or prepares to rewrite an existing file. The file pointer is set to the beginning of file.
#include
#include
int creat(path, mode)

char *path;
int mode;

cut
used to cut out parts of a file. It takes filenames as command line arguments or input from standard input. The command can cut columns as well as fields in a file. It however does not delete the selected parts of the file.
Cut [-ef] [column/fie,d] filename
Cut-d “:” –f1,2,3 filename
Where –d indicates a delimiter specified within “:”

df
used to find the number of free blocks available for all the mounted file systems.
#/etc/df [filesystem]

diff
the diff command compares text files. It gives an index of all the lines that differ in the two files along with the line numbers. It also displays what needs to be changed.
Diff filename1 filename2

echo
The echo command echoes arguments on the command line.
echo [arguments]

env
Displays the permanent environment variables associated with a user’s login id

exit command
Used to stop the execution of a shell script.

expr command
Expr (command) command is used for numeric computation.
The operators + (add), -(subtract), *(multiplu), /(divide), (remainder) are allowed. Calculation are performed in order of normal numeric precedence.

find
The find command searches through directories for files that match the specified criteria. It can take full pathnames and relative pathnames on the command line.
To display the output on screen the –print option must be specified

for operator
The for operator may be used in looping constructs where there is repetitive execution of a section of the shell program.
For var in vall val2 val3 val4;

Do commnds; done

fsck
Used to check the file system and repair damaged files. The command takes a device name as an argument
# /etc/fsck /dev/file-system-to-be-checked.

grave operator
Used to store the standard the output of a command in an enviroment variable. (‘)

grep
The grep (global regular expression and print) command can be used as a filter to search for strings in files. The pattern may be either a fixed character string or a regular expression.
Grep “string” filename(s)

HOME
User’s home directory

if operator
The if operator allows conditional operator

If expression; then commands; fi
if … then…else… fi
$ if; then

commands
efile; then

commands
fi

kill
used to stop background processes

In
used to link files. A duplicate of a file is created with another name

LOGNAME
displays user’s login name

ls
Lists the files in the current directory

Some of the available options are:
-l gives a long listing
-a displays all file{including hidden files

lp
used to print data on the line printer.
Lp [options] filename(s)

mesg
The mesg command controls messages received on a terminal.
-n does not allow messages to be displayed on screen
-y allows messages to be displayed on screen

mkdir
used to create directories

more
The more command is used to dispay data one screenful at a time.
More [filename]

mv
Mv (move) moves a file from one directory to another or simply changes filenames. The command takes filename and pathnames as source names and a filename or exiting directory as target names.
mv [source-file] [target-file]

news
The news command allows a user to read news items published by the system administrator.

ni
Displays the contents of a file with line numbers

passwd
Changes the password

paste
The paste command joins lines from two files and displays the output. It can take a number of filenames as command line arguments.
paste file1 file2

PATH
The directories that the system searches to find commands

pg
Used to display data one page (screenful) at a time. The command can take a number of filenames as arguments.
Pg [option] [filename] [filename2]…..

pipe
Operator (1) takes the output of one commands as input of another command.

ps
Gives information about all the active processes.

PS1
The system prompt

pwd
(print working directory) displays the current directory.

rm
The rm (remove) command is used to delete files from a directory. A number of files may be deleted simultaneously. A file(s) once deleted cannot be retrieved.
rm [filename 1] [filename 2]…

sift command
Using shift $1becomes the source string and other arguments are shifted. $2 is shifted to $1,$3to $2 and so on.

Sleep
The sleep command is used to suspend the execution of a shell script for the specified time. This is usually in seconds.

sort
Sort is a utility program that can be used to sort text files in numeric or alphabetical order
Sort [filename]

split
Used to split large file into smaller files
Split-n filename
Split can take a second filename on the command line.

su
Used to switch to superuser or any other user.

sync
Used to copy data in buffers to files

system0
Used to run a UNIX command from within a C program

tail
The tail command may be used to view the end of a file.
Tail [filename]

tar
Used to save and restore files to tapes or other removable media.
Tar [function[modifier]] [filename(s)]

tee
output that is being redirected to a file can also be viewed on standard output.

test command
It compares strings and numeric values.
The test command has two forms : test command itself If test ${variable} = value then
Do commands else do commands

File
The test commands also uses special operators [ ]. These are operators following the of are interpreted by the shell as different from wildcard characters.
Of [ -f ${variable} ]

Then
Do commands
Elif
[ -d ${variable} ]

then
do commands

else
do commands

fi
many different tests are possible for files. Comparing numbers, character strings, values of environment variables.

time
Used to display the execution time of a program or a command. Time is reported in seconds.
Time filename values

tr
The tr command is used to translate characters.
tr [-option] [string1 [string2]]

tty
Displays the terminal pathname

umask
Used to specify default permissions while creating files.

uniq
The uniq command is used to display the uniq(ue) lines in a sorted file.
Sort filename uniq

until
The operator executes the commands within a loop as long as the test condition is false.

wall
Used to send a message to all users logged in.
# /etc/wall message

wait
the command halts the execution of a script until all child processes, executed as background processes, are completed.

wc
The wc command can be used to count the number of lines, words and characters in a fine.
wc [filename(s)]
The available options are:
wc –[options] [filename]
-1
-w
-c
while operator
the while operator repeatedly performs an operation until the test condition proves false.

$ while
Ø do

commands
Ø done

who
displays information about all the users currently logged onto the system. The user name, terminal number and the date and time that each user logged onto the system.
The syntax of the who command is who [options]

write
The write command allows inter-user communication. A user can send messages by addressing the other user’s terminal or login id.
write user-name [terminal number]

Bash command line for Linux

An A-Z Index of the Bash command line for Linux.

  alias    Create an alias
apropos Search Help manual pages (man -k)
apt-get Search for and install software packages (Debian)
aspell Spell Checker
awk Find and Replace text, database sort/validate/index
b
bash GNU Bourne-Again SHell
bc Arbitrary precision calculator language
bg Send to background
break Exit from a loop
builtin Run a shell builtin
bzip2 Compress or decompress named file(s)
c
cal Display a calendar
case Conditionally perform a command
cat Display the contents of a file
cd Change Directory
cfdisk Partition table manipulator for Linux
chgrp Change group ownership
chmod Change access permissions
chown Change file owner and group
chroot Run a command with a different root directory
chkconfig System services (runlevel)
cksum Print CRC checksum and byte counts
clear Clear terminal screen
cmp Compare two files
comm Compare two sorted files line by line
command Run a command - ignoring shell functions
continue Resume the next iteration of a loop
cp Copy one or more files to another location
cron Daemon to execute scheduled commands
crontab Schedule a command to run at a later time
csplit Split a file into context-determined pieces
cut Divide a file into several parts
d
date Display or change the date & time
dc Desk Calculator
dd Convert and copy a file, write disk headers, boot records
ddrescue Data recovery tool
declare Declare variables and give them attributes
df Display free disk space
diff Display the differences between two files
diff3 Show differences among three files
dig DNS lookup
dir Briefly list directory contents
dircolors Colour setup for `ls'
dirname Convert a full pathname to just a path
dirs Display list of remembered directories
dmesg Print kernel & driver messages
du Estimate file space usage
e
echo Display message on screen
egrep Search file(s) for lines that match an extended expression
eject Eject removable media
enable Enable and disable builtin shell commands
env Environment variables
ethtool Ethernet card settings
eval Evaluate several commands/arguments
exec Execute a command
exit Exit the shell
expect Automate arbitrary applications accessed over a terminal
expand Convert tabs to spaces
export Set an environment variable
expr Evaluate expressions
f
false Do nothing, unsuccessfully
fdformat Low-level format a floppy disk
fdisk Partition table manipulator for Linux
fg Send job to foreground
fgrep Search file(s) for lines that match a fixed string
file Determine file type
find Search for files that meet a desired criteria
fmt Reformat paragraph text
fold Wrap text to fit a specified width.
for Expand words, and execute commands
format Format disks or tapes
free Display memory usage
fsck File system consistency check and repair
ftp File Transfer Protocol
function Define Function Macros
fuser Identify/kill the process that is accessing a file
g
gawk Find and Replace text within file(s)
getopts Parse positional parameters
grep Search file(s) for lines that match a given pattern
groups Print group names a user is in
gzip Compress or decompress named file(s)
h
hash Remember the full pathname of a name argument
head Output the first part of file(s)
history Command History
hostname Print or set system name
i
id Print user and group id's
if Conditionally perform a command
ifconfig Configure a network interface
ifdown Stop a network interface
ifup Start a network interface up
import Capture an X server screen and save the image to file
install Copy files and set attributes
j
join Join lines on a common field
k
kill Stop a process from running
killall Kill processes by name
l
less Display output one screen at a time
let Perform arithmetic on shell variables
ln Make links between files
local Create variables
locate Find files
logname Print current login name
logout Exit a login shell
look Display lines beginning with a given string
lpc Line printer control program
lpr Off line print
lprint Print a file
lprintd Abort a print job
lprintq List the print queue
lprm Remove jobs from the print queue
ls List information about file(s)
lsof List open files
m
make Recompile a group of programs
man Help manual
mkdir Create new folder(s)
mkfifo Make FIFOs (named pipes)
mkisofs Create an hybrid ISO9660/JOLIET/HFS filesystem
mknod Make block or character special files
more Display output one screen at a time
mount Mount a file system
mtools Manipulate MS-DOS files
mv Move or rename files or directories
mmv Mass Move and rename (files)
n
netstat Networking information
nice Set the priority of a command or job
nl Number lines and write files
nohup Run a command immune to hangups
nslookup Query Internet name servers interactively
o
open Open a file in its default application
op Operator access
p
passwd Modify a user password
paste Merge lines of files
pathchk Check file name portability
ping Test a network connection
pkill Stop processes from running
popd Restore the previous value of the current directory
pr Prepare files for printing
printcap Printer capability database
printenv Print environment variables
printf Format and print data
ps Process status
pushd Save and then change the current directory
pwd Print Working Directory
q
quota Display disk usage and limits
quotacheck Scan a file system for disk usage
quotactl Set disk quotas
r
ram ram disk device
rcp Copy files between two machines
read read a line from standard input
readonly Mark variables/functions as readonly
reboot Reboot the system
renice Alter priority of running processes
remsync Synchronize remote files via email
return Exit a shell function
rev Reverse lines of a file
rm Remove files
rmdir Remove folder(s)
rsync Remote file copy (Synchronize file trees)
s
screen Multiplex terminal, run remote shells via ssh
scp Secure copy (remote file copy)
sdiff Merge two files interactively
sed Stream Editor
select Accept keyboard input
seq Print numeric sequences
set Manipulate shell variables and functions
sftp Secure File Transfer Program
shift Shift positional parameters
shopt Shell Options
shutdown Shutdown or restart linux
sleep Delay for a specified time
slocate Find files
sort Sort text files
source Run commands from a file `.'
split Split a file into fixed-size pieces
ssh Secure Shell client (remote login program)
strace Trace system calls and signals
su Substitute user identity
sudo Execute a command as another user
sum Print a checksum for a file
symlink Make a new name for a file
sync Synchronize data on disk with memory
t
tail Output the last part of files
tar Tape ARchiver
tee Redirect output to multiple files
test Evaluate a conditional expression
time Measure Program running time
times User and system times
touch Change file timestamps
top List processes running on the system
traceroute Trace Route to Host
trap Run a command when a signal is set(bourne)
tr Translate, squeeze, and/or delete characters
true Do nothing, successfully
tsort Topological sort
tty Print filename of terminal on stdin
type Describe a command
u
ulimit Limit user resources
umask Users file creation mask
umount Unmount a device
unalias Remove an alias
uname Print system information
unexpand Convert spaces to tabs
uniq Uniquify files
units Convert units from one scale to another
unset Remove variable or function names
unshar Unpack shell archive scripts
until Execute commands (until error)
useradd Create new user account
usermod Modify user account
users List users currently logged in
uuencode Encode a binary file
uudecode Decode a file created by uuencode
v
v Verbosely list directory contents (`ls -l -b')
vdir Verbosely list directory contents (`ls -l -b')
vi Text Editor
vmstat Report virtual memory statistics
w
watch Execute/display a program periodically
wc Print byte, word, and line counts
whereis Report all known instances of a command
which Locate a program file in the user's path.
while Execute commands
who Print all usernames currently logged in
whoami Print the current user id and name (`id -un')
Wget Retrieve web pages or files via HTTP, HTTPS or FTP
write Send a message to another user
x
xargs Execute utility, passing constructed argument list(s)
yes Print a string until interrupted
. Run a command script in the current shell
### Comment / Remark

Tab Completion

Command History and Tab Completion

It doesn't take long before the thought of typing the same command over and over becomes unappealing, at best. In Linux, since you can string together commands at the shell prompt, one minor typing error can ruin lines of a command.

One solution is to use the command line history. By scrolling with the up and down arrow keys, you can find plenty of your previously typed commands.

Try it by taking a look again at sneakers.txt ( The first time, however, at the shell prompt, type:

cat sneakrs.txt

Nothing happens, of course, because there is no sneakrs.txt file. No problem. We'll just use the up-arrow key to bring back the command, then use the left-arrow key to get to the point where we missed the "e." Insert the letter and press [Enter] again.

We now see the contents of sneakers.txt.

By default, up to 500 commands can be stored in the bash command line history file.

TipThe History Environment Variable

By typing the env command at a shell prompt, we can see the environment variable that controls the size of the command line history. The line which reads, HISTFILESIZE=500 shows the number of commands that bash will store.

The command line history is actually kept in a file, called .bash_history in our login directory. We can read it in a number of ways: by using pico, cat, less, more, and others.

Be aware that the file can be long.

Let's read it with more:

more .bash_history

To move forward a screen, press [Space]; to move back a screen, press [b]; to quit, press [q].

TipLocating a Previously Used Command

Want to find a command in your history file without having to keep hitting the arrow keys or page through the history file? Use grep, a powerful search utility (see the section called The grep Command. Here's how you can quickly find a previously used command: Let's say you're searching for the command that was something like cat sneak-something. You've used the command and think it might be in your history file. At the shell prompt, then, type

history | grep sneak

Another time-saving tool is known as command completion. If you type part of a file, command, or pathname and then press the [Tab] key, bash will present you with either the remaining portion of the file/path, or a beep. If you get a beep, just press [Tab] again to obtain a list of the files/paths that match what's been typed so far.

For example, if you forget the command updatedb, but remember a portion of the command, you can su to root, then at the shell prompt, type up, press the [Tab] key twice and you'll see a list of possible completions, including updatedb and uptime. By adding the letter "d" to up and pressing [Tab] again, your command is completed for you.

REDHAT BASIC COMMANDS

The head Command

You can use the head command if you just want to look at the beginning of a file. The command is:

head 

Head can be a useful command, but because it's limited to the first several lines, you won't see how long the file actually is. By default, you can only read the first ten lines of a file, although you can change this number by specifying a number, as in the following command:

head -20 

The tail Command

The reverse of head is tail. Using tail, you can review the last ten lines of a file.

The grep Command

The grep command is useful for finding specific character strings in a file. For example, if you want to find every reference made to "coffee" in the file sneakers.txt, you would type:

grep coffee sneakers.txt

You would see every line in that file where the word "coffee" is found.

TipRemember Case

Unless otherwise specified, grep searches are case sensitive. That means that searching for Coffee is different than searching for coffee. So among grep's options is -i, which allows you to make a case-insensitive search through a file. Read the grep man page for more about this command.

I/O Redirection and Pipes

You can use pipes and output redirection when you want to store and/or print information to read at a later time.

You can, for example, use grep to search for particular contents of a file, then have those results either saved as a file or sent to a printer.

To print the information about references to "coffee" in sneakers.txt, for example, just type:

grep coffee sneakers.txt | lpr

Wildcards and Regular Expressions

What if you forget the name of the file you're looking for? Using wildcards or regular expressions, you can perform actions on a file or files without knowing the complete filename. Just fill out what you know, then substitute the remainder with a wildcard.

TipMore Information About Wildcards and Regular Expressions

To read more about wildcards and regular expressions, take a look at the bash man page (man bash). Remember that you can save the file to a text file by typing man bash | col -b > bash.txt. Then, you can open and read the file with less or pico (pico bash.txt). If you want to print the file, be aware that it is quite long.

We know the file's called "sneak____.txt," so just type:

ls sneak*.txt

and there's the name of the file:

sneakers.txt

You'll probably use the asterisk (*) most frequently when you're searching. The asterisk will search out everything that matches the pattern you're looking for. So even by typing:

ls *.txt

or:

ls sn*

You'd find sneakers.txt and any other files whose names begin with "sn." It helps to narrow your search as much as possible.

One way to narrow a search is to use the question mark symbol (?). Like the asterisk, using ? can help locate a file matching a search pattern.

In this case, though, ? is useful for matching a single character, so if you were searching for sneaker?.txt, you'd get sneakers.txt as a result, and/or sneakerz.txt, if there were such a filename.

When an asterisk, for example, just happens to be part of a filename, as might be the case if the file sneakers.txt was called sneak*.txt, that's when regular expressions can be useful.

Regular expressions are more complex than the straightforward asterisk or question mark.

Using the backslash (\), you can specify that you don't want to search out everything by using the asterisk, but you're instead looking for a file with an asterisk in the name.

If the file is called sneak*.txt, then, type:

sneak\*.txt

Here is a brief list of wildcards and regular expressions:

  • * — Matches all characters

  • ? — Matches one character in a string (such as sneaker?.txt)

  • \* — Matches the * character

  • \? — Matches the ? character

  • \) — Matches the ) character

Wednesday, May 6, 2009

Friday, January 23, 2009

redhat

redhat certified engineer .