Welcome viewers

In this blog you will find the following,
Several source codes in the following environments=> C, Java, SQL, Pl/SQL (Coming soon...)
Deadly essential commands often become handy in the following environment => MS DOS, UNIX.
Working with simulator (CAD TOOLS) => Tanner Tool Version 3.0 (Coming soon...)
Mini projects in different domain.
Discussion Forum (includes discussion of different debatable questions in IC Fabrication Fields.) (Coming soon...)
Essential Tips. (Coming soon...)
And lots more so keep following the blog. :)

Friday, September 9, 2011

UNIX COMMANDS

  • LEVEL - I
  1. List all the files and subdirectories of the directory /bin = cd bin ls bin
  2. List all the files including hidden files in your current directory = ls -a
  3. List all the files starting with letter 'r' in your current directory = ls r*
  4. List all the files having three characters in their names from your current directory. = ls ???
  5. List all the files with extension .doc in your current directory = ls *.doc
  6. List all the files having the first letter of their name within the range 'l' to , 's'  from your current directory =  ls [l-s]*
  7. Create a file text1 and read its input from keyboard = cat > text1
  8. Copy contents of file text1 to another file text2 = cp text1 text2
  9. Append the contents of file text2 to file text1 = cat >> text1 text2
  10. Count the number of files in the current directory = ls|wc -w
  11. Display the output of command ls -l to a file and on the output screen = ls -l|cat > text3 or ls -l|cat>>text2
  12. From file text1 print all lines starting from 10th line = tail +10 text1
  13. Find the number of users currently logged on to the system = who|wc -l
  14. Delete all the files with their names starting with "tmp" = rm tmp*
  • LEVEL - II
  1. Create a file FILE2 with some text in it. Increase the no. of hard links to the file FILE2 to 3 and check the inode number and link count for those names = ls -l FILE2 Fl1 Fl2|cut -d " " -f3,10
  2. Using one single command, display the output of "who" and "pwd" commands = who;pwd
  3. Display today's date = echo "Today is $(date+%a) $(date+%d) $(date+%h) $ (date+%y) "
  4. Display the text message on monitor screen "We are done!!!" = echo "We are done!!!"
  5. Display the message on monitor screen "The long listing of my home dir ----- is -----" = 'the long listing of my home dir '; pwd; echo ' is ';ls -l
  • LEVEL - III
  1. List only the directories in your current directory = find -type d|nl
  2. Display the name and count of the directories in the current directory = find -type d -print; find -type d|wc -l
  3. Find out whether the users with a pattern "itp9" in their names have logged in = who|cut -d " " -f1|fgrep itp9
  4. Find out whether a particular user "itp9" has logged in
    •  n=`who|cut -d " " -f1|fgrep ncs|wc-l`           if test $n -ne 0
                then
                      echo -e "no"
                else
                      echo -e "yes"
               fi 
  5. Assign a value "Black" to var1 and then display the following message on the terminal using this variable "Sirius Black is a true marauder."
    • Set var1 Black
    • echo "Sirius $var1 is a true marauder."
  6. Create the file employee.txt having ":" separated fields.  The fields of record are : enumber, ename, eposition, esal, edoj, edept. Now answer the following.
    1. List all the employees along with a row number = cat employee.txt|cut -d ":" -f2|nl
    2. Sort the files as per names = cat employee.txt|sort -t ":" +1 -2
    3. List top three salaried employees = cat employee.txt|sort -r -t ":" +3 -4|head -3
    4. Rmove duplicate record from the file = cat employee.txt|unique
    5. List dept. no along with no. of emplooyees working in each dept = cat employee.txt|cut -d ":" -f6, 1|unique
    6. Sort the file in descending order of salary = cat employee.txt|sort -r -t ":" +3 -4

  • LEVEL - IV
  1. Accept a file name and a number (x). Display x lines from the top of the file. Check if the file exists and is readable. The value of x should not exceed the total no. of lines in the files. Display suitable messages in case an error is encountered.
             echo 'Enter the file name'
             read file
             if test -e file
             then
                    echo 'File exists.'
                    if test -r file
                            echo 'File is readable'
                            echo 'Enter the line no.'
                            read n
                            x=`wc.. -l $file|cut -d " " -f1`
                            if test $n -lc $x
                            then
                                  head -$n $file
                           else
                                 echo 'The value exceeds total no of lines.'
                           fi
                    else
                          echo 'File is not readable'
                    fi
               else
                    echo 'File doesn't exist'
               fi

29 comments:

  1. There are lots of information about latest technology and how to get trained in them, like UNIX Training Chennai have spread around the web, but this is a unique one according to me. The strategy you have updated here will make me to get trained in future technologies(UNIX Course in Chennai). By the way you are running a great blog. Thanks for sharing this.

    UNIX Training Chennai | UNIX Course in Chennai

    ReplyDelete
    Replies
    1. Coding...: Unix Commands >>>>> Download Now

      >>>>> Download Full

      Coding...: Unix Commands >>>>> Download LINK

      >>>>> Download Now

      Coding...: Unix Commands >>>>> Download Full

      >>>>> Download LINK yY

      Delete
  2. Article is giving really productive information to everyone. Well done.UNIX Training in noida

    ReplyDelete
  3. I simply wanted to thank you so much again. I am not sure the things that I might have gone through without the type of hints revealed by you regarding that situation.
    Best Java Training Institute in chennai

    ReplyDelete
  4. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.


    Amazon Web Services Training in Chennai

    Best Java Training Institute Chennai

    ReplyDelete
  5. Thanks for sharing as it is an excellent post would love to read your future post for more knowledge Web Development Company in Bangalore | Web Design Companies in Bangalore

    ReplyDelete
  6. Hi,
    I must appreciate you for providing such a valuable content for us. This is one amazing piece of article. Helped a lot in increasing my knowledge.
    Software Testing Training in Chennai
    Best Software Testing Training Institute in Chennai
    Testing training
    Software Testing Training Institute Chennai
    Testing Training Chennai

    ReplyDelete
  7. The great service in this blog and the nice technology is visible in this blog. I am really very happy for the nice approach is visible in this blog and thank you very much for using the nice technology in this blog
    iosh course in chennai

    ReplyDelete
  8. Very informative. thanks for sharing. Keep up the good work. This could not be explain better than this. Please update such posts.
    Best unix training in kalyan nagar

    ReplyDelete

  9. Very nice posts, this could not be written better. Do posts like this, Thank you.


    Hybrid Decentralized Crypto Exchange | Best Crypto Exchange | Beldexcoin

    ReplyDelete
  10. Informative post indeed, I’ve being in and out reading posts regularly and I see alot of engaging people sharing things and majority of the shared information is very valuable and so, here’s my fine read.
    https://www.bloglovin.com/@myaarpmedicarecomlogin/medicare-supplement
    https://myaarpmedicarecom.tumblr.com/post/185342653384/medicare-supplement click here click here click here
    http://myaarpmedicarecom22.bravesites.com click here code html
    https://www.evernote.com/shard/s343/sh/25778201-4f5f-4f82-8bc6-f6cfed8202ba/635a9f044644e3d48fdab133d3ac4f36 click here co 2lz4drob
    http://myaarpmedicareofficialsite.yolasite.com click here code

    ReplyDelete
  11. Those guidelines additionally worked to become a good way to recognize that other people online have the identical fervor like mine to grasp great deal more around this condition.


    aws training in chennai | aws training in annanagar | aws training in omr | aws training in porur | aws training in tambaram | aws training in velachery


    ReplyDelete
  12. Coding...: Unix Commands >>>>> Download Now

    >>>>> Download Full

    Coding...: Unix Commands >>>>> Download LINK

    >>>>> Download Now

    Coding...: Unix Commands >>>>> Download Full

    >>>>> Download LINK zh

    ReplyDelete