Presentation is loading. Please wait.

Presentation is loading. Please wait.

CIS 240 Introduction to UNIX Instructor: Sue Sampson.

Similar presentations


Presentation on theme: "CIS 240 Introduction to UNIX Instructor: Sue Sampson."— Presentation transcript:

1 CIS 240 Introduction to UNIX Instructor: Sue Sampson

2 CIS240 – UNIX File Systems File Operations List View Copy Move Delete Change Ownership/Group Change Permissions

3 CIS240 – UNIX File Systems Viewing contents of text files cat [options] [filelist] Displays contents of file(s) Does not pause after each file Wildcards; *, ? can be used With no arguments, takes standard input and display to standout output One options is to include line numbers (-n)

4 CIS240 – UNIX File Systems Viewing contents of text files more [options] [filelist] Displays contents of file(s) one page at a time Wildcards; *, ? can be used For next page, hit space bar For next line, hit enter One options is to include number of lines ( –n25) head [options] [filelist] Displays line at the beginning of file tail [options] [filelist] Displays lines at the end of file

5 CIS240 – UNIX File Systems Files are added and changed by: The operating system Applications software (editors, word processors, spreadsheets, databases, etc) Transfer in from a network or external storage device (loading software packages or files transfer)

6 CIS240 – UNIX File Systems Files are deleted by: rm We can delete a single file or group of files with this command (wildcards) rmdir directory must be empty

7 CIS240 – UNIX File Systems Files are moved and copied by: mv mv myfiles/sample1.txt ~/sample1.old cp cp myfiles/sample1.txt temp/sample1.txt and are relative or absolute path names Relative starts with the current directory (no /) Absolute starts with the root directory (/)

8 CIS240 – UNIX File Systems Moving a group of files: mv * /temp mv /home/jrussell/*.txt /home/student01

9 CIS240 – UNIX File Systems Appending to text files: cat [filelist]>>destination file Appends contents of file list to destination file With no arguments, takes standard input and appends to destination file If destination file does not exist, it is created

10 CIS240 – UNIX File Systems Combining text files: cat [filelist]>destination file Concatenates contents of filelist (in order of appearance) and writes contents to destination file File overwritten if it already exists


Download ppt "CIS 240 Introduction to UNIX Instructor: Sue Sampson."

Similar presentations


Ads by Google