Friday, September 7, 2012

Some Linux Commands !!!



COMMAND
DESCRIPTION
SYNTAX



who
show who is logged on
who
su
change user ID
su <loginname>
passwd
to change your password
passwd
man
displays details of a command
man <command_name>
ls
list directory contents
ls
mkdir
make directories
mkdir <foldrname>
cd
changes directories
cd
cp
copy files and directories
cp a.txt copy.txt
mv
move files
cp a.txt <directory>
rm
remove files or directories
rm file1.txt
find
search for files in a directory
find file1.txt
pwd
print name of current working directory
pwd
history
prints recently used commands
history
mount
mount a file system or drive
mount /media/target
umount
unmount file systems or drive
unmount /media/target
poweroff
shut down the system
poweroff
reboot
restart the system
reboot
vim
A programmer’s text editor
vi hello.c
gedit
A text Editor
gedit hello.c
cal <month> <year>
display calendar
cal april 2012
date
displays the current date
date
echo
Print message on the terminal
echo "Welcome to the workshop"
printf
Print the formatted message on the terminal
printf "the amount is %d\n" 100
bc
A text based calculator
bc
xcalc
A graphical based calculator
xcalc
gcc
To compile C program file
gcc file1.c
g++
To compile C++ program file
g++ file1.c
ctrl+d
Quit command process