Tags:
create new tag
view all tags

A little test on what you have learned in the exercises on

Linux command line and basics of C programming

Linux commands:

  1. Which Linux command do you use to list all files in a directory (folder)?

  2. How do you see hidden files and how do you recognize them?

  3. How do you see the file permissions?

  4. How can you find out your current working directory?

  5. In the following screen dump I show the contents of one of my directories. You see two directories named “.” and “..” . What do these mean?
    ls.png

  6. You downloaded the file “yesterday.txt” to your $HOME/Downloads directory. How do you copy this file to your current working directory?

  7. Which command do you use to see the content of yesterday.txt

  8. Which command do you use to list all lines containing the string “yesterday” in yesterday.txt?

C programming

  1. The ASCII equivalent of the character ‘0’ is 0x30
    What does the following program print?

    myascii.png

  2. You can write programs allowing the user to enter command line parameters. The following program “cl.c” does this.

    cl.png

    What will it print if the user types:
    ./cl ike uli 25

Article text.

-- Uli Raich - 2017-10-02

Comments

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng cl.png r1 manage 14.9 K 2017-10-02 - 15:21 UnknownUser  
PNGpng ls.png r1 manage 17.1 K 2017-10-02 - 15:21 UnknownUser  
PNGpng myascii.png r1 manage 14.0 K 2017-10-02 - 15:21 UnknownUser  
Topic revision: r1 - 2017-10-02 - uli
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback