Your Only Destination To Empower Your Computer Programing Knowledge. Sky is not so high, You can Touch it if You Try

Script for showing all the basic commands of linux

echo show calendar of april month of year 2012
cal 4 2012
echo
echo show date and time
date
echo
echo creating a new file having name mca
cat > mca
echo
echo showing the contents of file mca
cat mca
echo
echo showing present working directory
pwd
echo
echo Creating a new directory
mkdir Nitika
echo
echo Showing the list of all directories
ls –ld
echo
echo show list of files
ls
echo
echo Enter the file which you want to remove
read a
rm -i $a
echo
echo Enter the name of user you want to add
read a
rm -i $a
echo
echo Enter the name of user you want to add
read a
adduser $a
passwd $a
echo
echo Showing the free disk space
df
echo
echo Showing list of all user
who
echo
echo showing list of file start with character k
ls k*
echo
echo showing permissions of file meenu
ls -l menu
echo
echo creating a hidden file name krishna
cat > .krishna
echo
echo Showing list of all hidden files
ls –a







Output:-



show calendar of april month of year 2012
April 2012
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30

show date and time
Thu Apr 12 15:37:59 IST 2012

creating a new file having name mca
jai shree Krishna

showing the contents of file mca
jai shree Krishna

showing present working directory
/root

Creating a new directory

Showing the list of all directories
drwxr-x--- 20 root root 4096 Apr 12 15:38 .

show list of files
?[?1049l? com install.log neelam sed
?[?12l?[?25h?[?1049l?]0 database install.log.syslog Nishtha seema
2713 Desktop jyoti Nitika sorting.sh
2744 emp.lst kanha oif stu.lst
2912 emp.txt kanhaiya pa stu.txt
2921 end keshav pain sum
2935 even m prm switch
3gt f madhav qwe w
anaconda-ks.cfg for main radhe wc
anand1 for1 marks radhika while
asd govind mca rain
awk grep meenu rajji
cmd heena nav result
cmdfile if nav.txt script

Enter the file which you want to remove
mca
rm: remove regular file `mca'? y

Enter the name of user you want to add
keerti
Changing password for user keerti.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

Showing the free disk space
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda8 9920592 1913620 7494904 21% /
/dev/hda7 101054 10005 85832 11% /boot
/dev/hda10 26680708 176200 25127340 1% /cdlu
tmpfs 971620 0 971620 0% /dev/shm

Showing list of all user
root pts/0 2012-04-12 14:33 (:0.0)

showing list of file start with character k
kanha kanhaiya keshav
showing permissions of file meenu
-rwxr-xr-x 1 root root 30 Apr 11 15:29 meenu

creating a hidden file name krishna
gunjan ghar aa ja

Showing list of all hidden files
. for1 nav
.. .gconf nav.txt
?[?1049l? .gconfd neelam
?[?12l?[?25h?[?1049l?]0 .gnome Nishtha
2713 .gnome2 Nitika
2744 .gnome2_private oif
2912 govind pa
2921 grep pain
2935 .grep.swo prm
3gt .grep.swp qwe
anaconda-ks.cfg .gstreamer-0.10 radhe
anand1 .gtk-bookmarks radhika
asd .gtkrc-1.2-gnome2 rain
awk heena rajji
.bash_history .heena .recently-used.xbel
.bash_logout .heena.swp .redhat
.bash_profile .ICEauthority result
.bashrc if script
cmd install.log sed
cmdfile install.log.syslog .sed.swp
com jyoti seema
.config kanha sorting.sh
.cshrc kanhaiya stu.lst
database .keerti stu.txt
Desktop keshav sum
.dmrc .krishna switch
.eggcups m .switch.swp
emp.lst madhav .tcshrc
emp.txt main .thumbnails
end marks .Trash
.esd_auth meenu w
even .metacity wc
f .mozilla while
for .nautilus .xsession-errors

No comments:

Post a Comment