diff options
author | Hardik Ghaghada | 2014-06-12 13:22:13 +0530 |
---|---|---|
committer | Hardik Ghaghada | 2014-06-12 13:22:13 +0530 |
commit | 1f7318ca9553270899537d98d75e9f4fced85ed4 (patch) | |
tree | 7d149f9203f7eb122e749696e570d10086275ce4 /ult/exercises.rst | |
parent | 985adfa4f8a8b9cfba2b0a573dadc77283651957 (diff) | |
download | sees-1f7318ca9553270899537d98d75e9f4fced85ed4.tar.gz sees-1f7318ca9553270899537d98d75e9f4fced85ed4.tar.bz2 sees-1f7318ca9553270899537d98d75e9f4fced85ed4.zip |
restructring repo
Diffstat (limited to 'ult/exercises.rst')
-rw-r--r-- | ult/exercises.rst | 109 |
1 files changed, 0 insertions, 109 deletions
diff --git a/ult/exercises.rst b/ult/exercises.rst deleted file mode 100644 index 9898b39..0000000 --- a/ult/exercises.rst +++ /dev/null @@ -1,109 +0,0 @@ -Exercises -========= - -Session-1 ---------- - -1. Login to your machine from the CLI prompt, by pressing Ctrl+Alt+F1. - -#. Logout and re-login. - -#. What is your present working directory, once you login? - -#. List all the files present in your current working directory. - -#. Navigate to the ``Desktop`` directory. If such a directory is not - present create one. - -#. Navigate back to the ``home`` directory. - -#. Create a directory called ``ult`` inside another directory called - ``sees``. Create both the directories in a single command. - -#. What would be your present working directory after doing the - following? - - :: - - cd ~/sees/./../ - -#. Use the touch command to create a file with your name in the - ``ult`` folder. - -#. Remove the file you created in the previous step. - -#. Navigate to your home directory and remove the directory - ``sees``. Use ``rm`` command. - -#. Re-create the directories ``sees`` and ``ult`` again. Now, remove - them using the ``rmdir`` command. Use ``man`` or ``--help``, if - required. - -#. Create a file with your first-name in your home directory and copy - it to ``sees/ult``. - -#. Copy the file again, but this time, ensure that ``cp`` checks if - such a file doesn't already exist. - -#. Copy the directory ``sees`` to the directory ``sttp``. - -#. Rename directory ``sttp`` with your name. - -#. Create a file ``test`` and modify its permission for user and group - to ``execute``. - -#. For the same ``test`` file, change mode to ``r,w,x`` for - all(user,group,others). - -#. Change ownership of the file ``test`` to some other user (if exists). - -#. Count the number of files (files, sub-directories, etc.) in a directory. - -#. Create a new file ``alice.txt`` by concatenating the first 30 lines - and the last 40 lines of ``wonderland.txt``. - -#. Show the lines from 10 to 20 of ``primes.txt`` - -#. Concatenate the content of ``foo.txt`` and ``bar.txt`` in a single - ``foobar.txt`` but with the ``source:wikipedia`` line appearing only - once, at the end of the file. - -Session-2 ---------- - -0. Read through the section ``REGULAR EXPRESSIONS`` in ``man grep`` - -#. Read through in ``man expr`` - -#. grep the marks of the students who scored above 75 in atleast one - subject. - -#. grep the marks of all the students whose names begin with an 's' - -#. grep the marks of all the students whose names begin with - consonants. - -#. change the results.sh script to accept the input files also as - arguments. - -#. Write a shell script that will take a filename as input and check - if it is executable. - -#. Modify the script in the previous step, to remove the execute - permissions, if the file is executable. - -#. Write a shell script to remove all executable files from a - directory, when a directory is given as argument. - -#. List all the years between 2001 and 2099 which have 5 Fridays, - Saturdays and Sundays in the month of July. Hint: ``man cal`` - -#. Generate frequency list of all the commands you have used, and show - the top 5 commands along with their count. (Hint: ``history`` command - will give you a list of all commands used.) - -#. generate a word frequency list for ``wonderland.txt``. Hint: use - ``grep``, ``tr``, ``sort``, ``uniq`` (or anything else that you want) - -#. **Print the middle line of a file**. - |