Sponsored Content
Full Discussion: Sample Practical
Top Forums Shell Programming and Scripting Sample Practical Post 302524105 by S4K on Saturday 21st of May 2011 02:42:13 PM
Old 05-21-2011
Sample Practical

Hello
Today I had a beautiful test to write some commands using Ubuntu, now I want to make sure of my answers to be reassured, if I had a mistake please correct me
  1. List all files details under ubuntu Desktop.

my answer:

Code:
cd Desktop |ls -l

  1. Navigate to your Desktop directory and write down the full path.

my answer:

Code:
pwd

  1. Create a directory under /home/ubuntu name the directory quiz.

my answer:
Code:
home@ubuntu:~$ mkdir ubuntu

home@ubuntu:~$ cd ubuntu

home@ubuntu:~/ubuntu$ mkdir quiz

home@ubuntu:~/ubuntu$ ls
quiz

home@ubuntu:~/ubuntu$ pwd

/home/home/ubuntu

  1. List all files which contain the letter p and redirect the output to a file under your quiz directory.

my answer:
Code:
ls p* > quiz

  1. Use grep command to extract the word time from ls manual and save the output to a file under your quiz directory.

my answer:

Code:
grep -t > quiz

  1. What does ls om*.su? do? Give an example for the output.

my answer:

Code:
list all files which content first letter o and second letter m and any letter in thread and have extension .su

  1. Student.txt file contains information about students which includes student Id,Student Name, subject, and Grade
Code:
04152:Jhon : COMP222:2 .5
04152:Smath : COMP222:3  
0123:Sara: COMP222:3
03234:Lea: COMP222:2.5

From this file use linux command extract student number and grade and save this information in a new file grade.txt

my answer:

Code:
cp Student.txt > grade.txt



[QUOTE=Chirel;302524109]

Last edited by Scott; 05-21-2011 at 07:54 PM.. Reason: Restore content removed by user; closed thread
 

4 More Discussions You Might Find Interesting

1. Ubuntu

Can a Pentium III (450mhz) have any practical use these days?

Having had a big sort out at work I've brought home 3 Dell Dimension XPS-450 PCs. I've installed Ubuntu Linux on one which went fine, everything works, network, sound, Graphics Drivers etc. and it can see all the other PCs & storage on my network and can use the Shared printers from other PCs on... (12 Replies)
Discussion started by: Mark Ward
12 Replies

2. UNIX for Advanced & Expert Users

Amoung tar and gzip whiich unix command is more practical with respect to space manag

Hi All Can any body help me out. Amoung tar and gzip whiich unix command is more practical with respect to space management and file restoration. Eg if I use tar or gzip which will be more helpful to reduce the space and during the file restoration. Please help me out. regards... (3 Replies)
Discussion started by: manas6
3 Replies

3. AIX

Looking for AIX Practical Experience

I have been in IT for around 7 years now and have benefited greatly from Open Source as well as free commercial offerings like Vmware Server that allow me to setup virtual environments and get some hands on time with different OS's and software. I am starting a new job in a few weeks which has... (5 Replies)
Discussion started by: supercrazy1
5 Replies

4. OS X (Apple)

Don't understand the practical difference between command aliases and environmental variables

Hey, I'm recently learning Unix from the video course by Kevin Scoglund. I'm stuck at the moment where he goes into Environmenat variables. I have some issues with understanding what's the essential difference between EV and command aliases: for instance, by writing the command alias ll='ls... (3 Replies)
Discussion started by: scrutinizerix
3 Replies
All times are GMT -4. The time now is 04:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy