Name: Tej. D. Shah Subject:CC-304 Linux Uni. Practical programme College :L.J. College Of Computer Application. Questions:

Size: px
Start display at page:

Download "Name: Tej. D. Shah Subject:CC-304 Linux Uni. Practical programme College :L.J. College Of Computer Application. Questions:"

Transcription

1 Name: Tej. D. Shah Subject:CC-304 Linux Uni. Practical programme College :L.J. College Of Computer Application Questions: Q.1 Check the output of the following commands:date, ls, who, cal, ps, wc, cat, uname, pwd, mkdir, rmdir, cd, cp, rm, mv, diff, chmod, grep, sed, head, tail,cut, paste, sort, nd, man Q.2 Write a script to nd the complete path for any le. Q.3 Write a shell script to execute following commands 1. Sort le abc.txt and save this sorted le in xyz.txt 2. Give an example of : To execute commands together without affecting result of each other. 3. How to print this is a three line 1. Text message 4. Which command display version of the UNIX? 5. How would u get online help of cat command? Q.4 Write a shell script to execute following commands 1. How would u display the hidden les? 2. How delete directory with les? 3. How would user can do interactive copying? 4. How would user can do interactive deletion of les? 5. Explain two functionality of mv command with example? Q.5 Write a shell script to execute following commands 1. Create a le called text and store name,age and address in it. 2. Display the contents of the le text on the screen. 3. Delete the directories mydir and newdir at one shot. 4. Sort a numeric le? 5. Change the permissions for the le newtext to 666. Q.6 Write shell script that accept lename and displays last modication time if le exists, otherwise display appropriate message. Q.7 Write a shell script to display the login names that begin with s. Q.8 Write a shell script to remove the zero sized le from the current directory

2 Q.9 Write a shell script to display the name of all the executable le from the current directory. Q.10 Write a shell script that will display welcome message according to time Q.11 Write a shell script to nd number of ordinary les and directory les. Q.12 Write a shell script that takes a lename from the command line and checks whether the le is an ordinary le or not. 1 If it is an ordinary le it should display the contents of the le. 2.If it is not an ordinary le script should display the message: File does not exist or is not ordinary, cannot display. Q.13 Write a shell script that takes a lename from the user and checks whether it is a directory le or not. 1 If it is a directory, the script should display the contents of the directory. 2.If it is not a directory le script should display the message: File is not a directory le Q.14 Write a shell script that takes a lename as an argument and checks if the le exists and is executable. 1If the le is executable the shell script should display the message: File exists 2 If the le does not exists and is not executable the script should display the message: File does not exist or is not executable. Q.15 Write a shell script that displays all subdirectories in current working directory. Q.16 Write a shell script that calculates the number of ordinary and directory les in your current working directory. Q17 Write a shell script that accepts 2 lenames and checks if both exists; if both exist append the content of the second le into the rst le. Q18 Write a shell script that takes the name of two les as arguments and performs the following: i. Displays the message : Displaying the contents of le :( rst argument) and displays the contents page wise. ii. Copies the contents of the rst argument to second argument. iii. Finally displays the message : File copied successfully. Q19 Write a shell script to display the following menu and acts accordingly: i. Calendar of the current month and year. ii. Display Good Morning/Good Afternoon/Good Evening according to the current login time. iii. User name, Users home directory. iv. Terminal name, Terminal type. v. Machine name. vi. No. of users who are currently logged in; List of users who are currently logged in.

3 Q.20 Write a shell script that displays the following menu and acts accordingly 1. Concatenates two strings 2. Renames a le 3. Deletes a le. 4. Copy the le to specic location Q.21 Write a shell script to change the sufx of all your *.txt les to.dat. Q.22 Write a shell script to accept a directory-name and display its contents. If input is not given HOME directory's contents should be listed. (Make use of command line argument) Q.23 Write a shell script to get all les of home directory and rename them if their names start with c. Newname = oldname111 Q.24 Write a shell script that takes two lename as arguments. It should check whether the contents of two les are same or not, if they are same second le should be deleted. Q.25 Write a shell script that accepts two directory names from the command line and copies all the les of one directory to another. The script should do the following _ If the source directory does not exist, flash a error message _ If destination directory does not exist create it _ Once both exist copy all the les from source directory to destination directory. Q.26 Write a shell script that displays the following menu _ List home directory _ Date _ Print working directory _ Users logged in Read the proper choice. Execute corresponding command. Check for invalid choice. Q.27 Write a shell script that displays all hidden les in current directory. Q.28 Write a shell script that Combine two les in the third le horizontally and vertically. Q.29 Write a shell script to delete all the spaces from a given le. Q.30 Write a shell script to nd a given date fall on a weekday or a weekend. Q.31 Write a shell script to search for a given word in all the les given as the arguments on the command line. Q.32 Write a shell script that display last modied le in the current directory. Q.33 Write a script to display the permissions of the particular le.

4 Q.34 Write a shell script to display the calendar in the following manner: i. Display the calendar of months m1 and m2 by CAL m1, m2 command le. ii. Display the calendar of the months from m1 to m2 by CAL m1-m2 command le. Q.35 Write a shell script to display the following menu for a particular le : i. Display all the words of a le in ascending order. ii. Display a le in descending order. iii. Toggle all the characters in the le. iv. Display type of the le. Q.36 Write a shell script to check whether the named user is currently logged in or not. Q.37 Write a shell script to display the following menu for a particular le: i.display all the words of a le in ascending order. ii.display a le in descending order. iii.display a le in reerse order. iv.toggle all the characters in the le v.display type of the le. Q.38 Write a shell script to nd total no. Of users and nds out how many of them are currently logged in. Q.39 Write a shell script that displays the directory information in the following format- Filename Size Date Protection Owner Q.40 Write a shell script to display ve largest les from the current directory Q.41 Write a shell script that toggles contents of the le Q.42 Write a shell script that report whether your friend has currently logged in or not. If he has logged in the shell script should send a message to his terminal suggesting a dinner tonight. If you do have write permission to his terminal or if he hasn t logged in such a message should be mailed to him about your dinner proposal. Q.43 Write a shell script for the performing the write and mail. Q.44 Write a shell script to accept any character using command line and list all the les starting with that character in the current directory. Q.45 Create a le called student containing roll-no, name and marks. a. Display the contents of the le sorted by marks in descending order b. Display the names of students in alphabetical order ignoring the case. c. Display students according to their roll nos. d. Sort le according to the second eld and save it to le names. e. Display the list of students who scored between 70 and 80. Note: Shell Script based on Files and lters should only to be asked in exam

5 Q.1 Check the output of the following commands:date, ls, who, cal, ps, wc, cat, uname, pwd, mkdir, rmdir, cd, cp, rm, mv, diff, chmod, grep, sed, head, tail,cut, paste, sort, nd, man Output:- date Thu Sep 4 11:38:40 IST 2014 abc@xyz-virtualbox:~$ ls Desktop Downloads Music Public Videos Documents examples.desktop Pictures Templates abc@xyz-virtualbox:~$ who xyz : :30 (:0) xyz pts/ :38 (:0) abc@xyz-virtualbox:~$ cal September 2014 Su Mo Tu We Th Fr Sa abc@xyz-virtualbox:~$ ps PID TTY TIME CMD 2598 pts/1 00:00:00 bash 2886 pts/1 00:00:00 ps abc@xyz-virtualbox:~$ ls wc abc@xyz-virtualbox:~$ cat le1 Hello abc@xyz-virtualbox:~$ uname Linux abc@xyz-virtualbox:~$ pwd /home/xyz abc@xyz-virtualbox:~$ mkdir abc

6 rmdir abc cd Desktop cp le1 le2 mv le2 le3 grep * grep: Documents: Is a directory grep: Downloads: Is a directory examples.desktop:[desktop Entry] grep: Music: Is a directory grep: Pictures: Is a directory grep: Public: Is a directory grep: Templates: Is a directory grep: Videos: Is a directory abc@xyz-virtualbox:~$ head -5 le1 Hello hi sad sadnslad sadsad abc@xyz-virtualbox:~$ tail -2 le1 x zc abc@xyz-virtualbox:~$ cat le1 cut -d":" -f1 RollNO abc@xyz-virtualbox:~$ sort le1 1 : xyz 2 : abc 3 : pqr RollNO :Name

7 paste le1 -d":" le3 RollNO:Name:Hello 1 : xyz: 2 : abc: 3 : pqr: Q.2 Write a script to nd the complete path for any le. echo "Enter name of le to nd the full path" read x readlink -f $x Q.3 Write a shell script to execute following commands 1. Sort le abc.txt and save this sorted le in xyz.txt 2. Give an example of : To execute commands together without affecting result of each other. 3. How to print this is a three line 1. Text message 4. Which command display version of the UNIX? 5. How would u get online help of cat command? select= until [ "$select" = "6" ]; do echo PROGRAM MENU echo 1 Sort le abc.txt and save this sorted le in xyz.txt echo 2 Give an example of:to execute commands together without affecting result of each other echo 3 How to print "this is a three -line Text message" echo 4 Which command display version of the UNIX? echo 5 How would u get online help of cat command echo 6 Exit echo Enter choice case $a in 1) echo File abc before sorting cat abc.txt echo File xyz after sorting sort abc.txt cat > xyz.txt

8 cat xyz.txt read x 2) echo Hi;cat le1 read y 3) printf "this is \na three -line\ntext message\n" read z read j 4) uname --version read e 5) echo man cat read f 6) exit ;; *) echo Please enter valid option read h esac done Q.4 Write a shell script to execute following commands 1. How would u display the hidden les? 2. How delete directory with les? 3. How would user can do interactive copying? 4. How would user can do interactive deletion of les? 5. Explain two functionality of mv command with example? select= until [ "$select" = "6" ]; do echo PROGRAM MENU echo 1 How would u display the hidden les? echo 2 How to delete directory with les? echo 3 How would user can do interactive copying? echo 4 How would user can do interactive deletion of les? echo 5 Expalin two functionalities of "mv" command with example? echo 6 Exit echo Enter choice

9 case $a in 1) ls -a read x 2) rm -r abc echo Directory with les removed read y 3) cp -i le4 le6 echo File1 copied to File2 read j 4) rm -i le4 le6 echo Both les removed read e 5) mv le5 le6 echo Renamed le5 as le6 read f mv Desktop Pictures read g 6) exit ;; *) echo Please enter valid option read h esac done Q.5 Write a shell script to execute following commands 1. Create a le called text and store name,age and address in it. 2. Display the contents of the le text on the screen. 3. Delete the directories mydir and newdir at one shot. 4. Sort a numeric le? 5. Change the permissions for the le newtext to 666. select= until [ "$select" = "6" ]; do echo PROGRAM MENU

10 echo 1 Create a le called text and store name,age and address in it. echo 2 Display the contents of the le text on the screen echo 3 Delete the directories mydir and newdir at one shot echo 4 Sort a numeric le? echo 5 Change the permissions for the le newtext to 666 echo 6 Exit echo Enter choice case $a in 1) echo Enter name,age and Address read name ge read Address (echo $name;echo $age;echo $Address) cat >> text.txt read g 2) cat text.txt read h 3) mkdir mydir;mkdir newdir echo Directories Created ls echo Directories removed rmdir mydir;rmdir newdir ls read j 4) sort -n no.txt read e 5) echo "This is new le" cat >> newtext chmod 666 newtext read g 6) exit ;; *) echo Please enter valid option read h esac done

11 Q.6 Write shell script that accept lename and displays last modication time if le exists, otherwise display appropriate message. echo PL enter lename if test -e $a ls -lt $a else echo File does not exist Q.7 Write a shell script to display the login names that begin with s. who grep s* Q.8 Write a shell script to remove the zero sized le from the current directory nd -size 0c -delete Q.9 Write a shell script to display the name of all the executable le from the current directory. nd -type f -executable -print Q.10 Write a shell script that will display welcome message according to time a="$(date +'%H')" if test $a -lt 12 echo Good Morning if test $a -gt 12 -a $a -lt 16 echo Good Afternoon if test $a -gt 16 -a $a -lt 20 echo Good Evening

12 if test $a -gt 20 echo Good Night Q.11 Write a shell script to nd number of ordinary les and directory les. echo Number of Ordinary les nd -type f wc -l echo Number of Directory les nd -type d wc -l Q.12 Write a shell script that takes a lename from the command line and checks whether the le is an ordinary le or not. 1 If it is an ordinary le it should display the contents of the le. 2.If it is not an ordinary le script should display the message: File does not exist or is not ordinary, cannot display. if test -f $1 echo $1 is Ordinary le echo $1 cat $1 else echo File is Directory Q.13 Write a shell script that takes a lename from the user and checks whether it is a directory le or not. 1 If it is a directory, the script should display the contents of the directory. 2.If it is not a directory le script should display the message: File is not a directory le echo Pl enter lename if test -d $a echo $a is Directory echo $a Contents

13 ls -l $a else echo File is not a Directory Q.14 Write a shell script that takes a lename as an argument and checks if the le exists and is executable. 1If the le is executable the shell script should display the message: File exists 2 If the le does not exists and is not executable the script should display the message: File does not exist or is not executable. if test -e $1 echo $1 exist else echo $1 does not exists if test -x $1 echo $1 is executable else echo $1 is not executable Q.15 Write a shell script that displays all subdirectories in current working directory. Output:- nd -type d Q.16 Write a shell script that calculates the number of ordinary and directory les in your current working directory. echo Number of Ordinary les nd -type f wc -l echo Number of Directory les nd -type d wc -l Q17 Write a shell script that accepts 2 lenames and checks if both exists; if both exist append the content of the second le into the rst le. echo PL enter rst lename

14 echo PL enter second lename read b if test -e $a -a -e $b cat $b >> $a Q18 Write a shell script that takes the name of two les as arguments and performs the following: i. Displays the message : Displaying the contents of le :( rst argument) and displays the contents page wise. ii. Copies the contents of the rst argument to second argument. iii. Finally displays the message : File copied successfully. echo Displaying the contents of rst argument page wise cat $1 more echo Copy the contents of rst argument to second argument read b cp $1 $2 echo File Copied Succesfully Q19 Write a shell script to display the following menu and acts accordingly: i. Calendar of the current month and year. ii. Display Good Morning/Good Afternoon/Good Evening according to the current login time. iii. User name, Users home directory. iv. Terminal name, Terminal type. v. Machine name. vi. No. of users who are currently logged in; List of users who are currently logged in. select= until [ "$select" = "7" ]; do echo PROGRAM MENU echo 1 Calendar of the current month and year echo 2 Display Good Morning/Good Afternoon/Good Evening according to the current login time. echo 3 User name,users home directory echo 4 Terminal name,terminal type echo 5 Machine name

15 echo 6 No of users who are currently logged in;list of users who are currenly logged in. echo 7 Exit echo Enter choice case $a in 1) cal read z 2) a="$(date +'%H')" if test $a -lt 12 echo Good Morning if test $a -gt 12 -a $a -lt 16 echo Good Afternoon if test $a -gt 16 -a $a -lt 20 echo Good Evening if test $a -gt 20 echo Good Night read x 3) echo Username;logname echo User Home directory;$home read c 4) echo "Terminalname" $SHELl echo Terminaltype tty read v 5) echo Machine name uname read b 6) echo List of users who are currently logged in who -q tail -1

16 read n 7) exit;; *) echo Please enter valid option read h esac done Q.20 Write a shell script that displays the following menu and acts accordingly 1. Concatenates two strings 2. Renames a le 3. Deletes a le. 4. Copy the le to specic location select= until [ "$select" = "5" ]; do echo PROGRAM MENU echo 1 Concatenates two strings echo 2 Renames a le echo 3 Deletes a le echo 4 Copy a le to specic location echo 5 Exit echo Enter choice case $a in 1) echo Enter string 1 echo Enter string 2 read b c=$a" "$b echo Concatenated Strin is $c read z 2) echo Renames a le mv le6 le7 echo File 6 renamed File7 successfully read g 3) echo Deletes a le rm le2 echo File2 removed successfully read j

17 4) echo Copy the le to specic location cp text.txt /home/xyz/downloads/xyz echo File text.txt succesfully Copied to xyz read v 5) exit;; *) echo Please enter valid option read h esac done Q.21 Write a shell script to change the sufx of all your *.txt les to.dat. echo Change Sufx of all your *.txt les to.dat for f in *.dat; do leftname=`basename $f dat` mv $f ${leftname}txt done Q.22 Write a shell script to accept a directory-name and display its contents. If input is not given HOME directory's contents should be listed. (Make use of command line argument) if test -d $1 ls $1 else ls $HOME Q.23 Write a shell script to get all les of home directory and rename them if their names start with c. Newname = oldname111 for f in c*; do mv $f r

18 done Q.24 Write a shell script that takes two lename as arguments. It should check whether the contents of two les are same or not, if they are same second le should be deleted. if test -e $1 -a -e $2 same=`diff $1 $2` if test -z $same rm $2 echo File 2 removed because contents of both the les were same else echo Both les are not same else echo File does not exist Q.25 Write a shell script that accepts two directory names from the command line and copies all the les of one directory to another. The script should do the following _ If the source directory does not exist, flash a error message _ If destination directory does not exist create it _ Once both exist copy all the les from source directory to destination directory. if test -d $1 echo Source Directory exists if test -d $2 cd $1 cp *.* $2\ else

19 mkdir $2 cd $1 cp *.* $2\ else echo Source Directory does not exist Q.26 Write a shell script that displays the following menu _ List home directory _ Date _ Print working directory _ Users logged in Read the proper choice. Execute corresponding command. Check for invalid choice. select= until [ "$select" = "5" ]; do echo PROGRAM MENU echo 1 List home directory echo 2 Date echo 3 Print working directory echo 4 Users logged in echo 5 Exit echo Enter choice case $a in 1) ls ~ read z 2) date read g 3) pwd read j 4) who read v 5) exit;; *) echo Please enter valid option read h

20 esac done Q.27 Write a shell script that displays all hidden les in current directory. ls -a Q.28 Write a shell script that Combine two les in the third le horizontally and vertically. select= until [ "$select" = "3" ]; do echo PROGRAM MENU echo 1 Vertically echo 2 Horizontally echo 3 Exit echo Enter choice case $a in 1) cat $1 > le9 cat $2 >> le9 read z 2) paste $1 $2 >> test2 read g 3) exit;; *) echo Please enter valid option read h esac done Q.29 Write a shell script to delete all the spaces from a given le. cat $1 tr -d " \t"

21 Q.31 Write a shell script to search for a given word in all the les given as the arguments on the command line. echo Enter the search word for i in $* do if test $a = $i echo Word $a Found on the command line argument done Q.32 Write a shell script that display last modied le in the current directory. ls -lt head -2 tail -1 cut -c Q.33 Write a script to display the permissions of the particular le. ls -l $1 more cut -c 1-11,42-46 Q.36 Write a shell script to check whether the named user is currently logged in or not. echo Pl enter user name to check if user is currently logged-in b=`who cut -c 1-5 head -1` if test $a = $b echo User is logged-in else echo User is not logged-in Q.38 Write a shell script to nd total no. Of users and nds out how many of them are currently logged in. tot=`cat /etc/passwd wc -l` cur=`who wc -l`

22 echo Total users $tot echo Currently logged in users $cur Q.40 Write a shell script to display ve largest les from the current directory du -a sort -n -r head -5 ls -lsh head -6 tail -5 Q.42 Write a shell script that report whether your friend has currently logged in or not. If he has logged in the shell script should send a message to his terminal suggesting a dinner tonight. If you do have write permission to his terminal or if he hasn t logged in such a message should be mailed to him about your dinner proposal. echo Pl enter user name to check if user is currently logged-in b=`who cut -c 1-5 head -1` if test $a!= $b echo User is not logged-in else echo User is not logged-in talk $a"dinner tonight at my place" Q.44 Write a shell script to accept any character using command line and list all the les starting with that character in the current directory. ls -lt $1* Note: 30,34,35,37,39,41,43,45 Shell scripts are not there!

23

LOG ON TO LINUX AND LOG OFF

LOG ON TO LINUX AND LOG OFF EXPNO:1A LOG ON TO LINUX AND LOG OFF AIM: To know how to logon to Linux and logoff. PROCEDURE: Logon: To logon to the Linux system, we have to enter the correct username and password details, when asked,

More information

Linux Shell Script. J. K. Mandal

Linux Shell Script. J. K. Mandal Linux Shell Script J. K. Mandal Professor, Department of Computer Science & Engineering, Faculty of Engineering, Technology & Management University of Kalyani Kalyani, Nadia, West Bengal E-mail: jkmandal@klyuniv.ac.in,

More information

Unix Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : December, More documents are freely available at PythonDSP

Unix Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : December, More documents are freely available at PythonDSP Unix Guide Meher Krishna Patel Created on : Octorber, 2017 Last updated : December, 2017 More documents are freely available at PythonDSP Table of contents Table of contents i 1 Unix commands 1 1.1 Unix

More information

Shell. SSE2034: System Software Experiment 3, Fall 2018, Jinkyu Jeong

Shell. SSE2034: System Software Experiment 3, Fall 2018, Jinkyu Jeong Shell Prof. Jinkyu Jeong (Jinkyu@skku.edu) TA -- Minwoo Ahn (minwoo.ahn@csl.skku.edu) TA -- Donghyun Kim (donghyun.kim@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu

More information

Table of contents. Our goal. Notes. Notes. Notes. Summer June 29, Our goal is to see how we can use Unix as a tool for developing programs

Table of contents. Our goal. Notes. Notes. Notes. Summer June 29, Our goal is to see how we can use Unix as a tool for developing programs Summer 2010 Department of Computer Science and Engineering York University Toronto June 29, 2010 1 / 36 Table of contents 1 2 3 4 2 / 36 Our goal Our goal is to see how we can use Unix as a tool for developing

More information

Introduction to the UNIX command line

Introduction to the UNIX command line Introduction to the UNIX command line Steven Abreu Introduction to Computer Science (ICS) Tutorial Jacobs University s.abreu@jacobs-university.de September 19, 2017 Overview What is UNIX? UNIX Shell Commands

More information

Unix Introduction to UNIX

Unix Introduction to UNIX Unix Introduction to UNIX Get Started Introduction The UNIX operating system Set of programs that act as a link between the computer and the user. Developed in 1969 by a group of AT&T employees Various

More information

CENG 334 Computer Networks. Laboratory I Linux Tutorial

CENG 334 Computer Networks. Laboratory I Linux Tutorial CENG 334 Computer Networks Laboratory I Linux Tutorial Contents 1. Logging In and Starting Session 2. Using Commands 1. Basic Commands 2. Working With Files and Directories 3. Permission Bits 3. Introduction

More information

UNIX ASSIGNMENT 1 TYBCA (Sem:V)

UNIX ASSIGNMENT 1 TYBCA (Sem:V) UNIX ASSIGNMENT 1 TYBCA (Sem:V) Given Date: 06-08-2015 1. Explain the difference between the following thru example ln & paste tee & (pipeline) 2. What is the difference between the following commands

More information

Basic Linux (Bash) Commands

Basic Linux (Bash) Commands Basic Linux (Bash) Commands Hint: Run commands in the emacs shell (emacs -nw, then M-x shell) instead of the terminal. It eases searching for and revising commands and navigating and copying-and-pasting

More information

Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p.

Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p. Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p. 2 Conventions Used in This Book p. 2 Introduction to UNIX p. 5 An Overview

More information

The Unix Shell & Shell Scripts

The Unix Shell & Shell Scripts The Unix Shell & Shell Scripts You should do steps 1 to 7 before going to the lab. Use the Linux system you installed in the previous lab. In the lab do step 8, the TA may give you additional exercises

More information

Useful Unix Commands Cheat Sheet

Useful Unix Commands Cheat Sheet Useful Unix Commands Cheat Sheet The Chinese University of Hong Kong SIGSC Training (Fall 2016) FILE AND DIRECTORY pwd Return path to current directory. ls List directories and files here. ls dir List

More information

On successful completion of the course, the students will be able to attain CO: Experiment linked. 2 to 4. 5 to 8. 9 to 12.

On successful completion of the course, the students will be able to attain CO: Experiment linked. 2 to 4. 5 to 8. 9 to 12. CIE- 25 Marks Government of Karnataka Department of Technical Education Bengaluru Course Title: Linux Lab Scheme (L:T:P) : 0:2:4 Total Contact Hours: 78 Type of Course: Tutorial, Practical s & Student

More information

Introduction to Unix: Fundamental Commands

Introduction to Unix: Fundamental Commands Introduction to Unix: Fundamental Commands Ricky Patterson UVA Library Based on slides from Turgut Yilmaz Istanbul Teknik University 1 What We Will Learn The fundamental commands of the Unix operating

More information

A Brief Introduction to the Linux Shell for Data Science

A Brief Introduction to the Linux Shell for Data Science A Brief Introduction to the Linux Shell for Data Science Aris Anagnostopoulos 1 Introduction Here we will see a brief introduction of the Linux command line or shell as it is called. Linux is a Unix-like

More information

2) clear :- It clears the terminal screen. Syntax :- clear

2) clear :- It clears the terminal screen. Syntax :- clear 1) cal :- Displays a calendar Syntax:- cal [options] [ month ] [year] cal displays a simple calendar. If arguments are not specified, the current month is displayed. In addition to cal, the ncal command

More information

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University Unix/Linux Basics 1 Some basics to remember Everything is case sensitive Eg., you can have two different files of the same name but different case in the same folder Console-driven (same as terminal )

More information

Chapter-3. Introduction to Unix: Fundamental Commands

Chapter-3. Introduction to Unix: Fundamental Commands Chapter-3 Introduction to Unix: Fundamental Commands What You Will Learn The fundamental commands of the Unix operating system. Everything told for Unix here is applicable to the Linux operating system

More information

Basic UNIX Commands BASIC UNIX COMMANDS. 1. cat command. This command is used to create a file in unix. Syntax: $ cat filename

Basic UNIX Commands BASIC UNIX COMMANDS. 1. cat command. This command is used to create a file in unix. Syntax: $ cat filename Basic UNIX Commands BASIC UNIX COMMANDS 1. cat This is used to create a file in unix. $ cat >filename This is also used for displaying contents in a file. $ cat filename 2. ls It displays the list of files

More information

CS 307: UNIX PROGRAMMING ENVIRONMENT KATAS FOR EXAM 1

CS 307: UNIX PROGRAMMING ENVIRONMENT KATAS FOR EXAM 1 CS 307: UNIX PROGRAMMING ENVIRONMENT KATAS FOR EXAM 1 Prof. Michael J. Reale Fall 2014 COMMAND KATA 0 Command Kata 0: Preparation First, go to ~/cs307 cd ~/cs307 Make directory dkata0 and go to it mkdir

More information

CS214 Advanced UNIX Lecture 4

CS214 Advanced UNIX Lecture 4 CS214 Advanced UNIX Lecture 4 March 2, 2005 Passing arguments to scripts When you invoke a command like > cat f1 f2 f3 f1, f2, f3 are all arguments you pass to the cat command. Many times in your script

More information

Introduction to Linux

Introduction to Linux Introduction to Linux M Tech CS I 2015-16 Arijit Bishnu Debapriyo Majumdar Sourav Sengupta Mandar Mitra Login, Logout, Change password $ ssh, ssh X secure shell $ ssh www.isical.ac.in $ ssh 192.168 $ logout,

More information

Linux & Shell Programming 2014

Linux & Shell Programming 2014 Practical No : 1 Enrollment No: Group : A Practical Problem Write a date command to display date in following format: (Consider current date as 4 th January 2014) 1. dd/mm/yy hh:mm:ss 2. Today's date is:

More information

Chapter 4. Unix Tutorial. Unix Shell

Chapter 4. Unix Tutorial. Unix Shell Chapter 4 Unix Tutorial Users and applications interact with hardware through an operating system (OS). Unix is a very basic operating system in that it has just the essentials. Many operating systems,

More information

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80 CSE 303 Lecture 2 Introduction to bash shell read Linux Pocket Guide pp. 37-46, 58-59, 60, 65-70, 71-72, 77-80 slides created by Marty Stepp http://www.cs.washington.edu/303/ 1 Unix file system structure

More information

Linux Command Line Primer. By: Scott Marshall

Linux Command Line Primer. By: Scott Marshall Linux Command Line Primer By: Scott Marshall Draft: 10/21/2007 Table of Contents Topic Page(s) Preface 1 General Filesystem Background Information 2 General Filesystem Commands 2 Working with Files and

More information

UNIX Programming Laboratory. Subject Code: 10MCA17

UNIX Programming Laboratory. Subject Code: 10MCA17 UNIX Programming Laboratory Subject Code: 1. a. Write a non-recursive shell script which accepts any number of arguments and prints them in the reverse order (For example, if the script is named rags,

More information

Part 1: Basic Commands/U3li3es

Part 1: Basic Commands/U3li3es Final Exam Part 1: Basic Commands/U3li3es May 17 th 3:00~4:00pm S-3-143 Same types of questions as in mid-term 1 2 ls, cat, echo ls -l e.g., regular file or directory, permissions, file size ls -a cat

More information

INd_rasN SOME SHELL SCRIPTING PROGRAMS. 1. Write a shell script to check whether the name passed as first argument is the name of a file or directory.

INd_rasN SOME SHELL SCRIPTING PROGRAMS. 1. Write a shell script to check whether the name passed as first argument is the name of a file or directory. 1. Write a shell script to check whether the name passed as rst argument is the name of a le or directory. Ans: #!/bin/bash if [ -f $1 ] echo "$1 is a le" echo "$1 is not a le" 2. Write a shell script

More information

Basic UNIX Commands BASIC UNIX COMMANDS. 1. cat command. This command is used to create a file in unix. Syntax: $ cat filename

Basic UNIX Commands BASIC UNIX COMMANDS. 1. cat command. This command is used to create a file in unix. Syntax: $ cat filename Basic UNIX Commands BASIC UNIX COMMANDS 1. cat command This command is used to create a file in unix. $ cat >filename This command is also used for displaying contents in a file. $ cat filename 2. ls command

More information

Lecture 02 The Shell and Shell Scripting

Lecture 02 The Shell and Shell Scripting Lecture 02 The Shell and Shell Scripting In this course, we need to be familiar with the "UNIX shell". We use it, whether bash, csh, tcsh, zsh, or other variants, to start and stop processes, control the

More information

Introduction of Linux

Introduction of Linux Introduction of Linux 阳 oslab2018_class1@163.com 寅 oslab2018_class2@163.com PART I Brief Introduction Basic Conceptions & Environment Install & Configure a Virtual Machine Basic Commands PART II Shell

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Kisik Jeong (kisik@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating

More information

Lab Working with Linux Command Line

Lab Working with Linux Command Line Introduction In this lab, you will use the Linux command line to manage files and folders and perform some basic administrative tasks. Recommended Equipment A computer with a Linux OS, either installed

More information

Self-test Linux/UNIX fundamentals

Self-test Linux/UNIX fundamentals Self-test Linux/UNIX fundamentals Document: e0829test.fm 16 January 2018 ABIS Training & Consulting Diestsevest 32 / 4b B-3000 Leuven Belgium TRAINING & CONSULTING INTRODUCTION TO THE SELF-TEST LINUX/UNIX

More information

BIOINFORMATICS POST-DIPLOMA PROGRAM SUBJECT OUTLINE Subject Title: OPERATING SYSTEMS AND PROJECT MANAGEMENT Subject Code: BIF713 Subject Description:

BIOINFORMATICS POST-DIPLOMA PROGRAM SUBJECT OUTLINE Subject Title: OPERATING SYSTEMS AND PROJECT MANAGEMENT Subject Code: BIF713 Subject Description: BIOINFORMATICS POST-DIPLOMA PROGRAM SUBJECT OUTLINE Subject Title: OPERATING SYSTEMS AND PROJECT MANAGEMENT Subject Code: BIF713 Subject Description: This course provides Bioinformatics students with the

More information

Unix Basics. Systems Programming Concepts

Unix Basics. Systems Programming Concepts Concepts Unix directories Important Unix file commands man, pwd, ls, mkdir, cd, cp, mv File and directory access rights through permission settings Using chmod to change permissions Other important Unix

More information

Introduction to Linux (Part I) BUPT/QMUL 2018/03/14

Introduction to Linux (Part I) BUPT/QMUL 2018/03/14 Introduction to Linux (Part I) BUPT/QMUL 2018/03/14 Contents 1. Background on Linux 2. Starting / Finishing 3. Typing Linux Commands 4. Commands to Use Right Away 5. Linux help continued 2 Contents 6.

More information

b. Write a shell script to find smallest of three numbers that are read from keyboard. Page 1 07MCA28 Unix Lab Manual:

b. Write a shell script to find smallest of three numbers that are read from keyboard. Page 1 07MCA28 Unix Lab Manual: R.V.College of Engineering Dept. of MCA 1a. Write a non recursive shell script which accepts any number of arguments and prints them in the reverse order (for example, if the script is named rags, executing

More information

UNIX COMMANDS AND SHELLS. UNIX Programming 2015 Fall by Euiseong Seo

UNIX COMMANDS AND SHELLS. UNIX Programming 2015 Fall by Euiseong Seo UNIX COMMANDS AND SHELLS UNIX Programming 2015 Fall by Euiseong Seo What is a Shell? A system program that allows a user to execute Shell functions (internal commands) Other programs (external commands)

More information

Set 1 MCQ Which command is used to sort the lines of data in a file in reverse order A) sort B) sh C) st D) sort -r

Set 1 MCQ Which command is used to sort the lines of data in a file in reverse order A) sort B) sh C) st D) sort -r 1. Which symbol will be used with grep command to match the pattern pat at the beginning of a line? A) ^pat B) $pat C) pat$ D) pat^ 2. Which command is used to sort the lines of data in a file in reverse

More information

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University Introduction to Linux Woo-Yeong Jeong (wooyeong@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating system of a computer What is an

More information

Unix as a Platform Exercises + Solutions. Course Code: OS 01 UNXPLAT

Unix as a Platform Exercises + Solutions. Course Code: OS 01 UNXPLAT Unix as a Platform Exercises + Solutions Course Code: OS 01 UNXPLAT Working with Unix Most if not all of these will require some investigation in the man pages. That's the idea, to get them used to looking

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Dong-Yun Lee (dylee@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating

More information

QUESTION BANK ON UNIX & SHELL PROGRAMMING-502 (CORE PAPER-2)

QUESTION BANK ON UNIX & SHELL PROGRAMMING-502 (CORE PAPER-2) BANK ON & SHELL PROGRAMMING-502 (CORE PAPER-2) TOPIC 1: VI-EDITOR MARKS YEAR 1. Explain set command of vi editor 2 2011oct 2. Explain the modes of vi editor. 7 2013mar/ 2013 oct 3. Explain vi editor 5

More information

Introduction: What is Unix?

Introduction: What is Unix? Introduction Introduction: What is Unix? An operating system Developed at AT&T Bell Labs in the 1960 s Command Line Interpreter GUIs (Window systems) are now available Introduction: Unix vs. Linux Unix

More information

Basic Linux Commands. Srihari Kalgi M.Tech, CSE (KReSIT), IIT Bombay. May 5, 2009

Basic Linux Commands. Srihari Kalgi M.Tech, CSE (KReSIT), IIT Bombay. May 5, 2009 Basic Linux Commands Srihari Kalgi M.Tech, CSE (KReSIT), IIT Bombay May 5, 2009 General Purpose utilities Linux File System File Handling Commands Compressing and Archiving Files Simple Filters General

More information

Operating Systems. Copyleft 2005, Binnur Kurt

Operating Systems. Copyleft 2005, Binnur Kurt 3 Operating Systems Copyleft 2005, Binnur Kurt Content The concept of an operating system. The internal architecture of an operating system. The architecture of the Linux operating system in more detail.

More information

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing Content 3 Operating Systems The concept of an operating system. The internal architecture of an operating system. The architecture of the Linux operating system in more detail. How to log into (and out

More information

Practical Session 0 Introduction to Linux

Practical Session 0 Introduction to Linux School of Computer Science and Software Engineering Clayton Campus, Monash University CSE2303 and CSE2304 Semester I, 2001 Practical Session 0 Introduction to Linux Novell accounts. Every Monash student

More information

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (( )) (( )) [ x x ] cdc communications, inc. [ x x ] \ / presents... \ / (` ') (` ') (U) (U) Gibe's UNIX COMMAND Bible ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The latest file from the Cow's

More information

PART I : MCS-041. (b) Use head and tail in a pipeline to display lines 25 through 75 of a file? $Head 25 file name $Tail 75 File name

PART I : MCS-041. (b) Use head and tail in a pipeline to display lines 25 through 75 of a file? $Head 25 file name $Tail 75 File name Course Code : MCS-045 Course Title : UNIX an DBMS Lab Assignment Number : MAC(4)/045/Assign/06 PART I : MCS-041 Ques 1 : Write the Unix commands for the following: (a) Use the more command, and a pipeline

More information

CSCI 211 UNIX Lab. Shell Programming. Dr. Jiang Li. Jiang Li, Ph.D. Department of Computer Science

CSCI 211 UNIX Lab. Shell Programming. Dr. Jiang Li. Jiang Li, Ph.D. Department of Computer Science CSCI 211 UNIX Lab Shell Programming Dr. Jiang Li Why Shell Scripting Saves a lot of typing A shell script can run many commands at once A shell script can repeatedly run commands Help avoid mistakes Once

More information

Unix as a Platform Exercises. Course Code: OS-01-UNXPLAT

Unix as a Platform Exercises. Course Code: OS-01-UNXPLAT Unix as a Platform Exercises Course Code: OS-01-UNXPLAT Working with Unix 1. Use the on-line manual page to determine the option for cat, which causes nonprintable characters to be displayed. Run the command

More information

Computer Systems and Architecture

Computer Systems and Architecture Computer Systems and Architecture Introduction to UNIX Stephen Pauwels University of Antwerp October 2, 2015 Outline What is Unix? Getting started Streams Exercises UNIX Operating system Servers, desktops,

More information

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester Linux Essentials Programming and Data Structures Lab M Tech CS First Year, First Semester Adapted from PDS Lab 2014 and 2015 Login, Logout, Password $ ssh mtc16xx@192.168.---.--- $ ssh X mtc16xx@192.168.---.---

More information

A Brief Introduction to Unix

A Brief Introduction to Unix A Brief Introduction to Unix Sean Barag Drexel University March 30, 2011 Sean Barag (Drexel University) CS 265 - A Brief Introduction to Unix March 30, 2011 1 / 17 Outline 1 Directories

More information

Lab #12: Shell Scripting

Lab #12: Shell Scripting Lab #12 Page 1 of 11 Lab #12: Shell Scripting Students will familiarize themselves with UNIX shell scripting using basic commands to manipulate the le system. Part A Instructions: This part will be demonstrated

More information

Introduction to UNIX Command Line

Introduction to UNIX Command Line Introduction to UNIX Command Line Files and directories Some useful commands (echo, cat, grep, find, diff, tar) Redirection Pipes Variables Background processes Remote connections (e.g. ssh, curl) Scripts

More information

Week 2 Lecture 3. Unix

Week 2 Lecture 3. Unix Lecture 3 Unix Terminal and Shell 2 Terminal Prompt Command Argument Result 3 Shell Intro A system program that allows a user to execute: shell functions (e.g., ls -la) other programs (e.g., eclipse) shell

More information

Introduction to UNIX command-line

Introduction to UNIX command-line Introduction to UNIX command-line Boyce Thompson Institute March 17, 2015 Lukas Mueller & Noe Fernandez Class Content Terminal file system navigation Wildcards, shortcuts and special characters File permissions

More information

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2 Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades 2017-2018 Q2 Facultat d Informàtica de Barcelona This first lab session is focused on getting experience in working

More information

Introduction to Linux. Roman Cheplyaka

Introduction to Linux. Roman Cheplyaka Introduction to Linux Roman Cheplyaka Generic commands, files, directories What am I running? ngsuser@ubuntu:~$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu

More information

Introduction to Linux

Introduction to Linux Introduction to Linux University of Bristol - Advance Computing Research Centre 1 / 47 Operating Systems Program running all the time Interfaces between other programs and hardware Provides abstractions

More information

Introduction to Supercomputing

Introduction to Supercomputing Introduction to Supercomputing TMA4280 Introduction to UNIX environment and tools 0.1 Getting started with the environment and the bash shell interpreter Desktop computers are usually operated from a graphical

More information

Introduction to UNIX command-line II

Introduction to UNIX command-line II Introduction to UNIX command-line II Boyce Thompson Institute 2017 Prashant Hosmani Class Content Terminal file system navigation Wildcards, shortcuts and special characters File permissions Compression

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Mukesh Pund Principal Scientist, NISCAIR, New Delhi, India History In 1969, a team of developers developed a new operating system called Unix which was written using C Linus Torvalds,

More information

Linux & Shell Programming 2014

Linux & Shell Programming 2014 Unit -1: Introduction to UNIX/LINUX Operating System Practical Practice Questions: Find errors (if any) otherwise write output or interpretation of following commands. (Consider default shell is bash shell.)

More information

Introduction to the Linux Command Line

Introduction to the Linux Command Line Introduction to the Linux Command Line May, 2015 How to Connect (securely) ssh sftp scp Basic Unix or Linux Commands Files & directories Environment variables Not necessarily in this order.? Getting Connected

More information

Shell programming. Introduction to Operating Systems

Shell programming. Introduction to Operating Systems Shell programming Introduction to Operating Systems Environment variables Predened variables $* all parameters $# number of parameters $? result of last command $$ process identier $i parameter number

More information

Linux Essentials Objectives Topics:

Linux Essentials Objectives Topics: Linux Essentials Linux Essentials is a professional development certificate program that covers basic knowledge for those working and studying Open Source and various distributions of Linux. Exam Objectives

More information

CENG393 Computer Networks Labwork 1

CENG393 Computer Networks Labwork 1 CENG393 Computer Networks Labwork 1 Linux is the common name given to a large family of operating systems. All Linux-based operating systems are essentially a large set of computer software that are bound

More information

The Shell. EOAS Software Carpentry Workshop. September 20th, 2016

The Shell. EOAS Software Carpentry Workshop. September 20th, 2016 The Shell EOAS Software Carpentry Workshop September 20th, 2016 Getting Started You need to download some files to follow this lesson. These files are found on the shell lesson website (see etherpad) 1.

More information

CS197U: A Hands on Introduction to Unix

CS197U: A Hands on Introduction to Unix CS197U: A Hands on Introduction to Unix Lecture 11: WWW and Wrap up Tian Guo University of Massachusetts Amherst CICS 1 Reminders Assignment 4 was graded and scores on Moodle Assignment 5 was due and you

More information

1. What statistic did the wc -l command show? (do man wc to get the answer) A. The number of bytes B. The number of lines C. The number of words

1. What statistic did the wc -l command show? (do man wc to get the answer) A. The number of bytes B. The number of lines C. The number of words More Linux Commands 1 wc The Linux command for acquiring size statistics on a file is wc. This command provides the line count, word count and number of bytes in a file. Open up a terminal, make sure you

More information

LING 408/508: Computational Techniques for Linguists. Lecture 5

LING 408/508: Computational Techniques for Linguists. Lecture 5 LING 408/508: Computational Techniques for Linguists Lecture 5 Last Time Installing Ubuntu 18.04 LTS on top of VirtualBox Your Homework 2: did everyone succeed? Ubuntu VirtualBox Host OS: MacOS or Windows

More information

The Unix Shell. Pipes and Filters

The Unix Shell. Pipes and Filters The Unix Shell Copyright Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See http://software-carpentry.org/license.html for more information. shell shell pwd

More information

3/8/2017. Unix/Linux Introduction. In this part, we introduce. What does an OS do? Examples

3/8/2017. Unix/Linux Introduction. In this part, we introduce. What does an OS do? Examples EECS2301 Title Unix/Linux Introduction These slides are based on slides by Prof. Wolfgang Stuerzlinger at York University Warning: These notes are not complete, it is a Skelton that will be modified/add-to

More information

Conditional Control Structures. Dr.T.Logeswari

Conditional Control Structures. Dr.T.Logeswari Conditional Control Structures Dr.T.Logeswari TEST COMMAND test expression Or [ expression ] Syntax Ex: a=5; b=10 test $a eq $b ; echo $? [ $a eq $b] ; echo $? 2 Unix Shell Programming - Forouzan 2 TEST

More information

Linux Refresher (1) 310/ Fourth Workshop on Distributed Laboratory Instrumentation Systems (30 October - 24 November 2006)

Linux Refresher (1) 310/ Fourth Workshop on Distributed Laboratory Instrumentation Systems (30 October - 24 November 2006) 310/1779-4 Fourth Workshop on Distributed Laboratory Instrumentation Systems (30 October - 24 November 2006) Linux Refresher (1) Razaq Babalola IJADUOLA These lecture notes are intended only for distribution

More information

Week 5 Lesson 5 02/28/18

Week 5 Lesson 5 02/28/18 Week 5 Lesson 5 02/28/18 Important Announcements Extra Credits If you haven t done so, send your pictures to risimms@cabrillo.edu for 3 points EXTRA CREDIT. Join LinkedIn for 3 points Perkins/VTEA Survey

More information

CS 3410 Intro to Unix, shell commands, etc... (slides from Hussam Abu-Libdeh and David Slater)

CS 3410 Intro to Unix, shell commands, etc... (slides from Hussam Abu-Libdeh and David Slater) CS 3410 Intro to Unix, shell commands, etc... (slides from Hussam Abu-Libdeh and David Slater) 28 January 2013 Jason Yosinski Original slides available under Creative Commons Attribution-ShareAlike 3.0

More information

EECS 2031E. Software Tools Prof. Mokhtar Aboelaze

EECS 2031E. Software Tools Prof. Mokhtar Aboelaze EECS 2031 Software Tools Prof. Mokhtar Aboelaze Footer Text 1 EECS 2031E Instructor: Mokhtar Aboelaze Room 2026 CSEB lastname@cse.yorku.ca x40607 Office hours TTH 12:00-3:00 or by appointment 1 Grading

More information

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab Basic Terminal Intro to Linux ssh short for s ecure sh ell usage: ssh [host]@[computer].[otheripstuff] for lab computers: ssh [CSID]@[comp].cs.utexas.edu can get a list of active computers from the UTCS

More information

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines Introduction to UNIX Logging in Basic system architecture Getting help Intro to shell (tcsh) Basic UNIX File Maintenance Intro to emacs I/O Redirection Shell scripts Logging in most systems have graphical

More information

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion. Warnings 1 First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion. Read the relevant material in Sobell! If

More information

Introduction to Linux and Cluster Computing Environments for Bioinformatics

Introduction to Linux and Cluster Computing Environments for Bioinformatics Introduction to Linux and Cluster Computing Environments for Bioinformatics Doug Crabill Senior Academic IT Specialist Department of Statistics Purdue University dgc@purdue.edu What you will learn Linux

More information

Outline. Structure of a UNIX command

Outline. Structure of a UNIX command Outline Structure of Unix Commands Command help (man) Log on (terminal vs. graphical) System information (utility) File and directory structure (path) Permission (owner, group, rwx) File and directory

More information

d. 1 e. test: $a: integer expression expected

d. 1 e. test: $a: integer expression expected 102 M/C Questions -1- PRINT Name: LAB Section: Test Version: 030 One-Answer Multiple Choice 102 Questions Read all the words of these instructions and both sides (back and front) of all pages. Use your

More information

Read the relevant material in Sobell! If you want to follow along with the examples that follow, and you do, open a Linux terminal.

Read the relevant material in Sobell! If you want to follow along with the examples that follow, and you do, open a Linux terminal. Warnings 1 First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion. Read the relevant material in Sobell! If

More information

Lecture 4. Log into Linux Reminder: Homework 1 due today, 4:30pm Homework 2 out, due next Tuesday Project 1 out, due next Thursday Questions?

Lecture 4. Log into Linux Reminder: Homework 1 due today, 4:30pm Homework 2 out, due next Tuesday Project 1 out, due next Thursday Questions? Lecture 4 Log into Linux Reminder: Homework 1 due today, 4:30pm Homework 2 out, due next Tuesday Project 1 out, due next Thursday Questions? Tuesday, September 7 CS 375 UNIX System Programming - Lecture

More information

Bourne Shell Reference

Bourne Shell Reference > Linux Reviews > Beginners: Learn Linux > Bourne Shell Reference Bourne Shell Reference found at Br. David Carlson, O.S.B. pages, cis.stvincent.edu/carlsond/cs330/unix/bshellref - Converted to txt2tags

More information

Essential Linux Shell Commands

Essential Linux Shell Commands Essential Linux Shell Commands Special Characters Quoting and Escaping Change Directory Show Current Directory List Directory Contents Working with Files Working with Directories Special Characters There

More information

DAVE LIDDAMENT INTRODUCTION TO BASH

DAVE LIDDAMENT INTRODUCTION TO BASH DAVE LIDDAMENT INTRODUCTION TO BASH @daveliddament FORMAT Short lectures Practical exercises (help each other) Write scripts LEARNING OBJECTIVES What is Bash When should you use Bash Basic concepts of

More information

Using UNIX. -rwxr--r-- 1 root sys Sep 5 14:15 good_program

Using UNIX. -rwxr--r-- 1 root sys Sep 5 14:15 good_program Using UNIX. UNIX is mainly a command line interface. This means that you write the commands you want executed. In the beginning that will seem inferior to windows point-and-click, but in the long run the

More information

Introduction to the Linux Command Line January Presentation Topics

Introduction to the Linux Command Line January Presentation Topics 1/22/13 Introduction to the Linux Command Line January 2013 Presented by Oralee Nudson ARSC User Consultant & Student Supervisor onudson@alaska.edu Presentation Topics Information Assurance and Security

More information

Software I: Utilities and Internals. What is UNIX?

Software I: Utilities and Internals. What is UNIX? Software I: Utilities and Internals Lecture 1 UNIX for Beginners What is UNIX? UNIX is a time-sharing operating system with userchosen shells (user interfaces) and one kernel (operating system core, which

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA Sanghoon Han(sanghoon.han@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Announcement (1) Please come

More information

Answers to Even-numbered Exercises

Answers to Even-numbered Exercises 11 Answers to Even-numbered Exercises 1. ewrite t propriate actions xists and the user does not have write permission to the le. Verify that the modied script works. 2. The special parameter "$@" is referenced

More information