11/10/2011. Directory Structures (continued)

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "11/10/2011. Directory Structures (continued)"

Transcription

1 Guide to Parallel Operating Systems with Chapter 6 Directory Commands Objectives Describe directory structures Display directory structures Navigate directory structures Work with directories Work with file management commands Use removable drives for the storage of application data Directory Structures Scenario: organize five buildings on a campus map Problem 1: adding departments creates clutter Problem 2: adding course information not possible Solution: organize campus information in a directory Creating a directory structure: Begin with Campus as the main directory Add buildings in alphabetical order Place the departments with the correct building Directories can be manipulated with various tools Windows 7 and Linux 5 6 Directory Structures (continued) Displaying Directory Structures Displaying directory structures in the Windows 7 CLI Using the command-line interface (CLI): User types a command at a visual (command) prompt OS sends back a response Two-way interaction continues as long as needed Use TREE or DIR command to view a directory Option for locating a single file or a set of files: Specify which characters your search must match Windows command prompt to open: Click Start, pointing to All Programs, click Accessories, and click Command Prompt Using the TREE Command to Display the Directory Structure TREE: creates graphical view of disk directories Shows current directory and all subdirectories below Command syntax: TREE [drive:][path] [/F] [/A] /F: displays filenames in each folder /A: uses ASCII characters (not extended characters) Example: TREE C:\Documents and Settings\ User01\My Documents 1

2 To include filenames add the /F switch Use the /A switch to exclude extended characters Use the pipe symbol ( ) to pass the output tree and tree /f command Displaying Filenames in the Windows 7 CLI DIR command: displays filenames and subdirectories Syntax: DIR [drive:][path][filename] [/O[[:]sortorder]] [/P] [/S] [/W] [drive:][path][filename]: specifies drive, directory, files /O: lists files in sorted order Sortorder: followed by one of six values: N, S, E, D, G,- /P: pauses after each screen of information /S: shows files in specified directory and subdirectories /W: uses wide list format Example: DIR C:\Users\User01\Documents\homework.doc Using Wildcard Characters in the Windows 7 CLI Two wildcard characters identify groups of files: The question mark (?): represents any character The asterisk (*), or star: represents any string Using the? wildcard in DIR mem???.txt: Lists files named in form mem + three characters Valid matches: memo.txt, memory.txt, mem49.txt Using the * wildcard in DIR *.DOC: Lists all files in current directory with.doc extension Using Wildcard Characters in the Windows 7 CLI (continued) Displaying the Directory Structure with Windows Explorer Windows Explorer is a graphic user interface Two panes used in layout of Windows Explorer: Left pane displays the directory structure of drives Right pane displays the structure of selected entry Basic operation: Expand Computer to display available drives Files and folders view options: Four icon views, List view, Details view, Tiles, Content view Displaying the Directory Structure in Fedora 13 Directories and files are organized hierarchically Ability to manipulate directory defined by rights: Superuser: arranges information anywhere Regular user: is confined to a particular branch Fedora 13: Might be configured to open command line Can open a Terminal console from a GUI Home directory is starting directory for regular users Example: /home/user01 2

3 Example: /home/user01 Linux Command Syntax Command [options] [parameter1] [parameter2] [parameter3] Executed command produces three data streams stdin (input) stdout (output) stderr (error) Data streams for ls -l, a sample command Current directory is the stdin Detailed long listing is the stdout Resulting errors are the stderr Commands may be used conjointly using redirection(><), sequential commands(;) or piping( ) REDIRECTION Under Linux, all programs that run are given three open files (3 file descriptors) when they are started by a shell: 0. Standard in, or STDIN 1. Standard out, or STDOUT 2. Standard error, or STDERR. 0. Standard in, or STDIN. This is where input comes from, and it normally points at your terminal device. To find out what device is your terminal, use the tty command. tty /dev/pts/0 REDIRECTION You can arrange to run any command and pass it input from a file in the following way: $ some-command < /path/to/some/file Note, the '$' is your prompt. Note also, you can always specify a complete path name for a file. For example: $ grep -i Student12 < /etc/passwd Would search for the string Student12' in /etc/passwd, regardless of the case of the characters. grep -i Student12 < /etc/passwd student12:x:1000:1000:student12,,,:/home/student12:/bin/bash REDIRECTION 1. Standard out, or STDOUT. This is where the normal output from a program goes. It normally points at your terminal 3

4 This is where the normal output from a program goes. It normally points at your terminal as well, but you can redirect it. You can redirect output in the following way: $ some-program > /path/to/some/file For example: $ grep -i Student12 /etc/passwd > /tmp/results REDIRECTION 2. Standard error, or STDERR. This is where error output from your program goes. This normally points at your terminal as well, but you can redirect it. Why have different output places for standard out and standard error? Well, as you will see when you come to writing shell scripts, you often do not want error messages cluttering up the normal output from a program. The numbers 0, 1, and 2 used to list STDIN, STDOUT and STDERR are IO 'channels, called file descriptors (FDs), that have exactly those numbers. That is, STDIN is FD 0, while STDOUT is FD 1, and STDERR is FD 2. REDIRECTION When the shell runs a program for you, it opens STDIN as FD 0, STDOUT as FD 1, and STDERR as FD 2, and then runs the program (technically, it almost always does a fork(2) and then an exec(3) or one of the exec?? calls). If you have redirected one of STDIN, STDOUT or STDERR, your shell opens that file as the appropriate FD before running the program. Now, what does this all have to do with you, I hear you ask? Well, there are lots of neat things you can do, but some things to watch out for as well. REDIRECTION A lot of inexperienced Linux users assume that they can redirect a file into a program and use the same name for redirecting the output: $ some-program < mega-important-data-file > mega-important-data-file They become very upset after doing the above, especially if that mega-important data file has never been backed up anywhere. Why is this? The shell opens the mega-important-data-file for reading and associates it with FD 0 (or STDIN), and then opens it for writing, but truncates it to zero length, and associates it with FD 1 (or STDOUT) as well. So, if you want to do something like the above, use a different file name for the output file. You should also back up the files as well. REDIRECTION Now, there are lots of redirection symbols that you can use, and here are some of them: < file means open a file for reading and associate with STDIN. << token Means use the current input stream as STDIN for the program until token is seen. This is something that would be used when doing scripting. > file means open a file for writing and truncate it and associate it with STDOUT. 4

5 25 > file means open a file for writing and truncate it and associate it with STDOUT. >> file means open a file for writing and seek to the end and associate it with STDOUT. This is how you append to a file using a redirect. n>& means redirect FD n to the same places as FD m. Eg, 2>&1 means send STDERR to the same place that STDOUT is going to. OK, here are some tricks that you might want to use in various places. If you are gathering evidence for a bug report, you might want to redirect the output from a series of programs to a text file. So you might do the following: $ some-buggy-program > important-evidence.txt $ echo ' MARKER ' >> important-evidence.txt $ some-buggy-program some-params >> important-evidence.txt The second and subsequent lines append the output from the commands issues to the evidence file rather than overwriting them. Try the following: $ echo This is a line of text > /tmp/file.txt $ echo This is another line > /tmp/file.txt What do you get? > file means open a file for writing and truncate it and associate it with STDOUT. The file.txt will only contain This is another line Now try: $ echo This is a line of text > /tmp/file.txt $ echo This is another line >> /tmp/file.txt What do you get this time? OK, for the last few tricks here. Sometimes you want to append STDOUT and STDERR to a file. How do you do it? $ some-command >> /tmp/log.log 2>&1 The 2>&1 says make STDERR point to the same places as STDOUT. Since STDOUT is open already, and the shell has done a seek to the end, STDERR will also be appended to STDOUT. If you want to append a line to a file, you can echo the line you want with a redirect, rather than firing up an editor: $ echo Some text >> /path/to/some/file It turns out that you can cause the shell to redirect to other file descriptors as well. REDIRECTION Why is redirecting so important? Well, it is used in many shell scripts, it is a simple and convenient mechanism to sending output to any file without the programmer having to add code for handling command line instructions, and it is the Linux way of doing things. It is also the same as piping, where you redirect output to, or input from, a pipe device. The pipe device has a process living on the other side, and you will see this on subsequent slides. 5

6 Fedora 13 Command Syntax Command [options] [parameter1] [parameter2] [parameter3] ls l (the l is a lowercase L): Provides a detailed list of directories, files, and any errors ls l Documents: Provides a list of files in the Documents directory Linux Command Syntax (continued) Three methods for executing commands Same line, sequential command-line processing Example: ls l /etc ; pwd Semicolon (;) separates commands Piped, sequential command processing Example: ls l /etc more Pipe symbol pipes output from ls to more Batch file sequential processing Example: ls l /etc Commands saved for later execution as a batch file Displaying Directories and Files in the Fedora 13 CLI Use ls command to view list of directories and files ls default: display directory with files alpha sorted ls command syntax: ls [options] [location] Some ls command options: -a :shows hidden files -l :a long-listing format -R :list subdirectories recursively A few examples of useful ls commands: ls l /etc/hosts :list details about hosts file ls is /etc/hosts :list the size and inode number pwd Displaying Directories and Files in the Fedora 13 CLI (continued) Use more with ls to list hidden and unhidden files Example: ls Ra /etc more -R, --recursive - list subdirectories recursively Use sort with ls to control order item appears in list Example: ls l /etc sort -r k8 (sort by 8 th field in list name field, reverse order) sort command syntax: sort [options] [files] pwd command syntax: pwd [options]: Displays full path filename of the current directory more command syntax: more [options] ls l /etc sort r k Using the tree Command to Display the Directory Structure in the Fedora 13 CLI Tree: Recursive directory listing program 6

7 Produces an indented listing of files tree command: Shows files in current directory and its subdirectories Used to list contents of directories in tree-like format When directory information is given: Tree lists all files and/or subdirectories found in the given directories Using Wildcard Characters in the Fedora 13 CLI Uses same wildcard characters as Windows 7 Two wildcard characters identify groups of files: The question mark (?): represents any character The asterisk (*), or star: represents any string Example with? wildcard: ls host???? Lists files consisting of host plus any four characters Possible matches: hostuser, hosthome, host1234 Example using * wildcard: *.* Represents all filenames with any extension Navigating the Directory Structure Analogize operation to climbing a tree: Before climbing, look up and view the limbs Climb the limbs, move to smaller limbs; retrace steps Discussion of navigation techniques to follow Navigating the Directory Structure in the Windows 7 CLI Working directory: current directory (location) To change current directory: CHDIR, CD Syntax of CD command: CD [/D] [drive:][path] Three choices used with the CD command: CD..: backs up one subdirectory CD path: changes to the relative location CD \path: changes to the absolute location Scenario: change relative location of E:\User01 Enter CD College at the command prompt Command prompt changes to E:\User01\College Navigating Directory Structures in Windows Explorer Navigating directories in Windows Explorer: Click a folder in the left pane of Windows Explorer The location changes, the right pane is refreshed For example: To make Science the current folder Click Science in the left pane 40 7

8 41 42 Navigating Directory Structures in Fedora 13 Use the cd command to change current directory: Page definition options are beyond scope of book cd command syntax: cd [options] [location path] Using Absolute and Relative Paths in the Fedora 13 CLI Two methods: change absolute path or relative path Other directory symbols:. entry: points to the current directory.. entry: points to the parent directory Change the directory with the absolute path method: Type cd /college/business/accounting Refer to previous directory using the relative path: Type cd../../business/accounting Type cd.. To back up one subdirectory and move up higher Working with Directories Creating directories in the Windows 7 CLI Use MD or MKDIR to create a subdirectory in Windows MD command syntax: MD [drive:]path MD interprets drive and path like CD: MD path: creates subdirectory in a relative location MD \path: creates subdirectory in absolute location Creating Physics subdirectory relative to Science: Navigate to Science with the CD command Type MD Physics (relative path method) or Type MD \User01\College\Science\Physics Working with Directories (continued) Creating Directories in the Windows 7 GUI Navigate to the parent folder Science in left pane Click Science Right-click the white space Point to New Click Folder and type Physics Press Enter Creating Directories in Fedora 13 Users authorized to create directories with mkdir: Superuser 8

9 Regular user with write permission in parent directory mkdir syntax: (md does not work in Linux) mkdir [options] [directory name] mkdir command options: -p: makes parent directories as needed -v: displays a message for each created directory Navigating to arts directory, adding printing directory: cd /college/arts mkdir printing Removing Directories in the Windows 7 CLI Use RMDIR or RD (remove directory) command RD command syntax: RD [/S] [/Q] [drive:]path: /S: removes directories and files in specified location /Q: quiet mode (confirmation not requested) Two choices for removing a directory: RD path: removal relative from current location RD \path: removal absolute from current location Removing the Science directory: Type RD /S \User01\College\Science Press Enter and then type Y to confirm Removing Directories in the Windows 7 GUI To remove a directory: Navigate to target folder and right-click Click Delete Confirm choice by clicking the Yes button Removing the Music folder: Right-click Music in the right pane Click Delete, and then confirm the deletion A deleted item is placed in the Recycle Bin: Items can be restored or permanently deleted Removing Directories in Fedora 13 Ownership permission or superuser logon required rmdir command syntax: rmdir [options] directory[s] rmdir command options: (rm does work work) -p: tries to remove components in path as needed Cannot be used if directories contain files -v: displays a message for each removed directory Navigate to Printing directory, remove component: cd /college/arts rmdir printing Working with Files To keep your files up to date: Copy one or more files to an alternative location Move files or directories to another folder or drive Rename files and directories 9

10 Delete files from the computer Working with Files in the Windows 7 CLI Copying files in the Windows 7 CLI COPY command: copies files to alternative location XCOPY: a more powerful version of COPY Using the COPY Command in the Windows 7 CLI Command syntax: COPY [/V] source [destination]: source: specifies the file(s) to be copied destination: specifies target directory and/or filename /V: verifies that new files are written correctly About the /V switch: Used to verify that data has been accurately recorded Slows down COPY as OS must check all disk sectors Using the XCOPY Command in the Windows 7 CLI see page 259 Similar to COPY command, but has more switches Use XCOPY command to: Copy files in bulk from one directory or drive to another Copy whole directories to a new destination XCOPY syntax: XCOPY source [destination] [/P] [/S] [/E] [/V] [/Q] [/F] [/L] Making a backup of College subdirectories and files: XCOPY /S \User01\College \User01\Backup /S option excludes empty directories from operation Moving Files in the Windows 7 CLI Command syntax for moving files: MOVE [/Y /-Y] [drive:] [path]filename1[,...] [destination] Command syntax for renaming a directory: MOVE [/Y /-Y] [drive:][path]dirname1 dirname2 MOVE similar to COPY with one exception: Source file is always removed from the disk Rename the Dental subdirectory to Dental Assistant: MOVE \User01\College\Technology\Dental \User01\College\Technology\Dental Assistant Renaming Files in the Windows 7 CLI RENAME command syntax for renaming files: RENAME [drive:][path]filename1 filename2 REN command syntax for renaming files: REN [drive:][path]filename1 filename2 Renaming the Budget.xls file: Type REN Budget.xls Budget2006.xls Wildcards (* and?) used to change set of filenames: Restriction: old and new name lengths stay the same Change.txt extension to.bak : REN *.txt *.bak Deleting Files in the Windows 7 CLI DEL syntax: DEL [/P] [/S] [/Q] names 10

11 DEL syntax: DEL [/P] [/S] [/Q] names ERASE syntax: ERASE [/P] [/S] [/Q] names Options for both commands: /P: prompts for confirmation before deleting each file /S: deletes specified files from all subdirectories /Q: operates in quiet mode Delete one or more files using DEL command To remove the homework.doc file: DEL \User01\homework.doc Working with Files in the Windows 7 GUI Copying files in the Windows 7 GUI: Example: copying the homework.doc file Navigate to the subdirectory that contains the file Right-click homework.doc Click Copy Navigate to the new location in the left pane Right-click the white space of the right pane Click Paste Moving Files in the Windows 7 GUI Similar to copying files in Windows Explorer Example: to move the homework.doc file Navigate to the subdirectory that contains the file Right-click homework.doc Click Cut Navigate to the new location in the left pane Right-click the white space of the right pane Click Paste Renaming Files in the Windows 7 GUI Example: to rename the homework.doc file Navigate to the subdirectory that contains the file Right-click homework.doc Click Rename Type a new name over homework.doc Press Enter to save the name Attempt to change extension generates warning: Enter Yes to indicate that new extension is acceptable Deleting Files in the Windows 7 GUI Example: to delete the homework.doc file Navigate to the subdirectory that contains the file Right-click homework.doc Click Delete Confirm File Delete message generated: To delete the file, click the Yes button 11

12 Working with Files in Fedora 13 Copying files in the Fedora 13 CLI Three variations on the cp command syntax: cp [options] [source path] [target path] cp [options] [source path] [target directory] cp [options] [source directory] [target directory] Some cp command options: -l: makes hard links instead of copying them -R or -r: copies directories recursively -s: makes symbolic links instead of copying files To copy a branch with deep, nested directories: cp -r /college/science/chemistry/* /college/arts/ Understanding UNIX / Linux filesystem Inodes The inode (index node) is a fundamental concept in the Linux and UNIX file system. Each object in the file system is represented by an inode. But what are the objects? Let us try to understand it in simple words. Inode (Object) Attributes: All the information listed below is stored in an inode. In short the inode identifies the file and its attributes. => File type (executable, block special etc) => Permissions (read, write etc) => Owner => Group => File Size => File access, change and modification time (remember UNIX or Linux never stores file creation time, this is favorite question asked in UNIX/Linux sys admin job interview) => File deletion time => Number of links (soft/hard) => Extended attribute such as append only or no one can delete file including root user (immutability) => Access Control List (ACL) Inode Attributes All the above information is stored in an inode. In short the inode identifies the file and its attributes (as above). Each inode is identified by a unique inode number within the file system. Inode is also know as index number. inode definition An inode is a data structure on a traditional Unix-style file system such as UFS or ext3. An inode stores basic information about a regular file, directory, or other file system objects

13 69 Hard and Soft Links Symbolic links (also called symlinks or softlinks) most resemble Windows shortcuts. They contain a pathname to a target file. Hard links are a bit different. They are listings that contain information about the file. Linux files don't actually live in directories. They are assigned an inode number, which Linux uses to locate files. So a file can have multiple hardlinks, appearing in multiple directories, but isn't deleted until there are no remaining hardlinks to it. Here are some other differences between hardlinks and symlinks: 1. You cannot create a hardlink for a directory. 2. If you remove the original file of a hardlink, the link will still show you the content of the file. 3. A symlink can link to a directory. 4. A symlink, like a Windows shortcut, becomes useless when you remove the original file Hardlinks Let's do a little experiment to demonstrate the case. Make a new directory called Test and then move into it. to do that, type: $ mkdir Test $ cd Test Then make a file called FileA: $ vi FileA Press the i key to enter Insert mode: i Then type in some funny lines of text (like "Why did the chicken cross the road?") and save the file by typing: Esc ZZ So, you made a file called FileA in a new directory called "Test" in your /home. It contains an old and maybe not so funny joke. Now, let's make a hardlink to FileA. We'll call the hardlink FileB. (The logical link command is used.) $ ln FileA FileB Then use the "i" argument to list the inodes for both FileA and its hardlink. Type: $ ls -il FileA FileB This is what you get: rw-r--r-- 2 bruno bruno 21 May 5 15:55 FileA rw-r--r-- 2 bruno bruno 21 May 5 15:55 FileB You can see that both FileA and FileB have the same inode number ( ). Also both files have the same file permissions and the same size. Because that size is reported for the same inode, it does not consume any extra space on your HD! Next, remove the original FileA: $ rm FileA And have a look at the content of the "link" FileB: $ cat FileB You will still be able to read the funny line of text you typed. 13

14 You will still be able to read the funny line of text you typed Symlinks Staying in the same test directory as above, let's make a symlink to FileB. Call the symlink FileC: $ ln -s FileB FileC Then use the i argument again to list the inodes. $ ls -il FileB FileC This is what you'll get: rw-r--r-- 1 bruno bruno 21 May 5 15:55 FileB lrwxrwxrwx 1 bruno bruno 5 May 5 16:22 FileC -> FileB You'll notice the inodes are different and the symlink got a "l" before the rwxrwxrwx. The link has different permissions than the original file because it is just a symbolic link. Its real content is just a string pointing to the original file. The size of the symlink (5) is the size of its string. (The "-> FileB" at the end shows you where the link points to.) Now list the contents: $ cat FileB $ cat FileC They will show the same funny text. Now if we remove the original file: $ rm FileB and check the Test directory: $ ls You'll see the symlink FileC is still there, but if you try to list the contents: $ cat FileC It will tell you that there is no such file or directory. You can still list the inode. Typing: $ ls -il FileC will still give you: lrwxrwxrwx 1 bruno bruno 5 May 5 16:22 FileC -> FileB But the symlink is obsolete because the original file was removed, as were all the hard links. So the file was deleted even though the symlink remains. (Hope you're still following.) OK. The test is over, so you can delete the Test directory: $ cd.. $ rm -rf Test (r stands for recursive and f is for force) Note: Be cautious using "rm -rf"; it's very powerful. If someone tells you to do "rm -rf /" as root, you might loose all your files and directories on your / partition! Not good advice. Now you know how to create (and remove) hardlinks and symlinks it will make it easier to access files and run programs. 14

15 Summary - Hard vs. Soft link in Linux Hard link vs. Soft link in Linux or UNIX Hard links cannot links directories Cannot cross file system boundaries Soft or symbolic links are just like hard links. It allows to associate multiple filenames with a single file. However, symbolic links allows: To create links between directories Can cross file system boundaries These links behave differently when the source of the link is moved or removed. Symbolic links are not updated. Hard links always refer to the source, even if moved or removed. Moving Files in the Fedora 13 CLI Two variations on the command syntax: mv [options] [source] [target] mv [options] [source] [target directory] Command options: -f: displays a prompt before overwriting -I: also displays a prompt before overwriting but is used in interactive processing -v: displays command activity as it occurs mv similar to cp with one exception: The source file is always removed from its directory Renaming the Files in the Fedora 13 CLI Use the mv command To change Dental Department to Dental Assistant: Type mv /User01/college/technology/dental /User01/college/technology/dental assistant Use quotes to enclose filenames with spaces Deleting Files in the Fedora 13 CLI Use the rm command to delete one or more files rm command syntax: rm [options] file[s] rm command options: -I: prompts before any removal -R or -r: removes contents of directories recursively -v: displays command activity as it occurs To remove all of the.doc files from /User01: Type rm /mnt/sdb1/user01/* Using Removable Drives for Application Data Storage Using Removable Drives in the Windows 7 CLI Format disk before use: To remove any existing files To improve the odds that the USB drive will accept new files without write errors After formatting disk: 15

16 You can copy the files from the hard drive Formatting Removable Drives in the Windows 7 CLI FORMAT syntax: FORMAT volume [/V:label] [/Q] volume: specifies drive letter (followed by a colon) /V:label: specifies the volume label /Q: performs a quick format To format a USB drive as the H drive: Type FORMAT H: and press Enter Specify up to 11 volumes using the /V switch Use the /Q switch to perform a quick format Copying Files to a Removable Drive in the Windows 7 CLI Copy files to formatted disk with COPY or XCOPY To copy the homework.doc file: Navigate to the subdirectory that contains the file Enter the command COPY homework.doc H: Using Removable Drives in the Windows 7 GUI Formatting removable drives in the Windows 7 GUI: To format a USB drive: Place it in the USB port From Windows Explorer, right-click the USB option and then click Format Format USB dialog box appears Click the Quick Format check box Click the Start button to start the format Using Removable Drives in the Windows 7 GUI (continued) Copying files to a Disk in the Windows 7 GUI Windows Explorer: Can copy files to a formatted disk Storing files from an application Click File ->Save As Click the Save in list box, click the USB drive Type filename then click Save Using Removable Drives in the Fedora 13 CLI To prepare a disk for use: Unmount the disk and format it Mount the disk drive and copy files from hard drive Formatting removable drives in the Fedora 13 CLI: Use floppy command to format removable drives Syntax: floppy [options] [target device] Using Removable Drives in the Fedora 13 CLI (continued) 16

17 Formatting removable drives in the Fedora 13 CLI (continued): Some options used with floppy command: probe, -p: probes for available floppy drives -format, -f: formats the disk in the floppy drive Copying files to a removable drive in the Fedora 13 CLI To copy a file called homework.doc: Navigate to subdirectory that contains file, then use cp homework.doc /dev/fd0 or cp homework.doc /dev/sda Summary Use directory structures to: Organize and maintain information in files and folders Use a command-line interface (CLI): To help you display the contents of a directory To manage the directory structure: Create new directories to categorize folder information Remove directories that are obsolete When you navigate directory structures: Each operating system has its own syntax Summary (continued) When navigating the absolute path: Provide the drive and the full path name When navigating with a relative path: The current directory path is implied Use a command prompt or a GUI to: Copy, move, rename, and delete files Removable drives: Provide portability for file management and processing 17

Std: XI CHAPTER-3 LINUX

Std: XI CHAPTER-3 LINUX Commands: General format: Command Option Argument Command: ls - Lists the contents of a file. Option: Begins with minus sign (-) ls a Lists including the hidden files. Argument refers to the name of a

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

Advanced Linux Commands & Shell Scripting

Advanced Linux Commands & Shell Scripting Advanced Linux Commands & Shell Scripting Advanced Genomics & Bioinformatics Workshop James Oguya Nairobi, Kenya August, 2016 Man pages Most Linux commands are shipped with their reference manuals To view

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

Introduction to Linux Part 1. Anita Orendt and Wim Cardoen Center for High Performance Computing 24 May 2017

Introduction to Linux Part 1. Anita Orendt and Wim Cardoen Center for High Performance Computing 24 May 2017 Introduction to Linux Part 1 Anita Orendt and Wim Cardoen Center for High Performance Computing 24 May 2017 ssh Login or Interactive Node kingspeak.chpc.utah.edu Batch queue system kp001 kp002. kpxxx FastX

More information

Command Line Interface The basics

Command Line Interface The basics Command Line Interface The basics Marco Berghoff, SCC, KIT Steinbuch Centre for Computing (SCC) Funding: www.bwhpc-c5.de Motivation In the Beginning was the Command Line by Neal Stephenson In contrast

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

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

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

Unix tutorial. Thanks to Michael Wood-Vasey (UPitt) and Beth Willman (Haverford) for providing Unix tutorials on which this is based.

Unix tutorial. Thanks to Michael Wood-Vasey (UPitt) and Beth Willman (Haverford) for providing Unix tutorials on which this is based. Unix tutorial Thanks to Michael Wood-Vasey (UPitt) and Beth Willman (Haverford) for providing Unix tutorials on which this is based. Terminal windows You will use terminal windows to enter and execute

More information

CSE Linux VM. For Microsoft Windows. Based on opensuse Leap 42.2

CSE Linux VM. For Microsoft Windows. Based on opensuse Leap 42.2 CSE Linux VM For Microsoft Windows Based on opensuse Leap 42.2 Dr. K. M. Flurchick February 2, 2017 Contents 1 Introduction 1 2 Requirements 1 3 Procedure 1 4 Usage 3 4.1 Start/Stop.................................................

More information

Lab - Common Windows CLI Commands

Lab - Common Windows CLI Commands Introduction In this lab, you will use CLI commands to manage files and folders in Windows. Recommended Equipment A computer running Windows Step 1: Access the Windows command prompt. a. Log on to a computer

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

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

Linux Command Line Interface. December 27, 2017

Linux Command Line Interface. December 27, 2017 Linux Command Line Interface December 27, 2017 Foreword It is supposed to be a refresher (?!) If you are familiar with UNIX/Linux/MacOS X CLI, this is going to be boring... I will not talk about editors

More information

Chapter 6. Linux File System

Chapter 6. Linux File System Chapter 6 Linux File System 1 File System File System management how to store informations on storage devices The Hierarchical Structure Types of file Common File system Tasks 2 The Hierarchical Structure

More information

Shell Programming Overview

Shell Programming Overview Overview Shell programming is a way of taking several command line instructions that you would use in a Unix command prompt and incorporating them into one program. There are many versions of Unix. Some

More information

Introduction to Linux Workshop 1

Introduction to Linux Workshop 1 Introduction to Linux Workshop 1 The George Washington University SEAS Computing Facility Created by Jason Hurlburt, Hadi Mohammadi, Marco Suarez hurlburj@gwu.edu Logging In The lab computers will authenticate

More information

Module 8 Pipes, Redirection and REGEX

Module 8 Pipes, Redirection and REGEX Module 8 Pipes, Redirection and REGEX Exam Objective 3.2 Searching and Extracting Data from Files Objective Summary Piping and redirection Partial POSIX Command Line and Redirection Command Line Pipes

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

Unix Basics. UNIX Introduction. Lecture 14

Unix Basics. UNIX Introduction. Lecture 14 Unix Basics Lecture 14 UNIX Introduction The UNIX operating system is made up of three parts; the kernel, the shell and the programs. The kernel of UNIX is the hub of the operating system: it allocates

More information

Introduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen

Introduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen Introduction to Unix The Windows User perspective Wes Frisby Kyle Horne Todd Johansen What is Unix? Portable, multi-tasking, and multi-user operating system Software development environment Hardware independent

More information

Practical 4. Linux Commands: Working with Directories

Practical 4. Linux Commands: Working with Directories Practical 4 Linux Commands: Working with Directories 1. pwd: pwd stands for Print Working Directory. As the name states, command pwd prints the current working directory or simply the directory user is,

More information

System Programming. Introduction to Unix

System Programming. Introduction to Unix Content : by Dr. B. Boufama School of Computer Science University of Windsor Instructor: Dr. A. Habed adlane@cs.uwindsor.ca http://cs.uwindsor.ca/ adlane/60-256 Content Content 1 Introduction 2 3 Introduction

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

Introduction to Linux

Introduction to Linux p. 1/40 Introduction to Linux Xiaoxu Guan High Performance Computing, LSU January 31, 2018 p. 2/40 Outline What is an OS or Linux OS? Basic commands for files/directories Basic commands for text processing

More information

Disk Operating System

Disk Operating System Disk Operating System DOS stands for Disk Operating System. DOS controls the computer s hardware and provides an environment for programs to run. This system program must always be present when working

More information

An Introduction to DOS

An Introduction to DOS An Introduction to DOS Contents 1. Introduction........................................................................................ 1 2. The file system......................................................................................

More information

COMS 6100 Class Notes 3

COMS 6100 Class Notes 3 COMS 6100 Class Notes 3 Daniel Solus September 1, 2016 1 General Remarks The class was split into two main sections. We finished our introduction to Linux commands by reviewing Linux commands I and II

More information

The UNIX Operating System. HORT Lecture 2 Instructor: Kranthi Varala

The UNIX Operating System. HORT Lecture 2 Instructor: Kranthi Varala The UNIX Operating System HORT 59000 Lecture 2 Instructor: Kranthi Varala Operating Systems Image By Golftheman - Own work, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=4558519 Operating

More information

Using the Zoo Workstations

Using the Zoo Workstations Using the Zoo Workstations Version 1.86: January 16, 2014 If you ve used Linux before, you can probably skip many of these instructions, but skim just in case. Please direct corrections and suggestions

More information

My Favorite bash Tips and Tricks

My Favorite bash Tips and Tricks 1 of 6 6/18/2006 7:44 PM My Favorite bash Tips and Tricks Prentice Bisbal Abstract Save a lot of typing with these handy bash features you won't find in an old-fashioned UNIX shell. bash, or the Bourne

More information

EECS2301. Lab 1 Winter 2016

EECS2301. Lab 1 Winter 2016 EECS2301 Lab 1 Winter 2016 Lab Objectives In this lab, you will be introduced to the Linux operating system. The basic commands will be presented in this lab. By the end of you alb, you will be asked to

More information

An Introduction to Using the Command Line Interface (CLI) to Work with Files and Directories

An Introduction to Using the Command Line Interface (CLI) to Work with Files and Directories An Introduction to Using the Command Line Interface (CLI) to Work with Files and Directories Mac OS by bertram lyons senior consultant avpreserve AVPreserve Media Archiving & Data Management Consultants

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

$Id: asg4-shell-tree.mm,v :36: $

$Id: asg4-shell-tree.mm,v :36: $ cmps012b 2002q2 Assignment 4 Shell and Tree Structure page 1 $Id: asg4-shell-tree.mm,v 323.32 2002-05-08 15:36:09-07 - - $ 1. Overview A data structure that is useful in many applications is the Tree.

More information

Fall 2017 :: CSE 306. File Systems Basics. Nima Honarmand

Fall 2017 :: CSE 306. File Systems Basics. Nima Honarmand File Systems Basics Nima Honarmand File and inode File: user-level abstraction of storage (and other) devices Sequence of bytes inode: internal OS data structure representing a file inode stands for index

More information

GNU/Linux Course Lesson 1. Puria Nafisi

GNU/Linux Course Lesson 1. Puria Nafisi GNU/Linux Course Lesson 1 Puria Nafisi Azizi @pna http://netstudent.polito.it Netstudent is an students volunteer association within the Politecnico di Torino. Is build of different people and students

More information

UNIX Command Cheat Sheets

UNIX Command Cheat Sheets UNIX Command Cheat Sheets date Writes the current date to the date Mon Nov 20 18:25:37 EST 2000 sort infile Sorts the contents of the input file in alphabetical order sort names Sorts the contents of names

More information

CST Algonquin College 2

CST Algonquin College 2 The Shell Kernel (briefly) Shell What happens when you hit [ENTER]? Output redirection and pipes Noclobber (not a typo) Shell prompts Aliases Filespecs History Displaying file contents CST8207 - Algonquin

More information

The UNIX File System

The UNIX File System The UNIX File System Magnus Johansson (May 2007) 1 UNIX file system A file system is created with mkfs. It defines a number of parameters for the system as depicted in figure 1. These paremeters include

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

Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers

Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers Review of the Linux File System and Linux Commands 1. Introduction Becoming adept at using the Linux OS requires gaining familiarity

More information

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou EECS 2031 - Software Tools Lab 2 Tutorial: Introduction to UNIX/Linux Tilemachos Pechlivanoglou (tipech@eecs.yorku.ca) Sep 22 & 25, 2017 Material marked with will be in your exams Sep 22 & 25, 2017 Introduction

More information

Operating Systems, Unix Files and Commands SEEM

Operating Systems, Unix Files and Commands SEEM Operating Systems, Unix Files and Commands SEEM 3460 1 Major Components of Operating Systems (OS) Process management Resource management CPU Memory Device File system Bootstrapping SEEM 3460 2 Programs

More information

The Command Line. Matthew Bender. September 10, CMSC Command Line Workshop. Matthew Bender (2015) The Command Line September 10, / 25

The Command Line. Matthew Bender. September 10, CMSC Command Line Workshop. Matthew Bender (2015) The Command Line September 10, / 25 The Command Line Matthew Bender CMSC Command Line Workshop September 10, 2015 Matthew Bender (2015) The Command Line September 10, 2015 1 / 25 Introduction Section 1 Introduction Matthew Bender (2015)

More information

AN INTRODUCTION TO UNIX

AN INTRODUCTION TO UNIX AN INTRODUCTION TO UNIX Paul Johnson School of Mathematics September 18, 2011 OUTLINE 1 INTRODUTION Unix Common Tasks 2 THE UNIX FILESYSTEM Moving around Copying, deleting File Permissions 3 SUMMARY OUTLINE

More information

An Introduction to Unix Power Tools

An Introduction to Unix Power Tools An to Unix Power Tools Randolph Langley Department of Computer Science Florida State University August 27, 2008 History of Unix Unix Today Command line versus graphical interfaces to COP 4342, Fall History

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

Unix/Linux Operating System. Introduction to Computational Statistics STAT 598G, Fall 2011

Unix/Linux Operating System. Introduction to Computational Statistics STAT 598G, Fall 2011 Unix/Linux Operating System Introduction to Computational Statistics STAT 598G, Fall 2011 Sergey Kirshner Department of Statistics, Purdue University September 7, 2011 Sergey Kirshner (Purdue University)

More information

TEL2821/IS2150: INTRODUCTION TO SECURITY Lab: Operating Systems and Access Control

TEL2821/IS2150: INTRODUCTION TO SECURITY Lab: Operating Systems and Access Control TEL2821/IS2150: INTRODUCTION TO SECURITY Lab: Operating Systems and Access Control Version 1.0, Last Edited 09/20/2005 Name of Students: Date of Experiment: Part I: Objective The objective of the exercises

More information

Essentials for Scientific Computing: Bash Shell Scripting Day 3

Essentials for Scientific Computing: Bash Shell Scripting Day 3 Essentials for Scientific Computing: Bash Shell Scripting Day 3 Ershaad Ahamed TUE-CMS, JNCASR May 2012 1 Introduction In the previous sessions, you have been using basic commands in the shell. The bash

More information

An Illustrated Guide to Shell Magic: Standard I/O & Redirection

An Illustrated Guide to Shell Magic: Standard I/O & Redirection An Illustrated Guide to Shell Magic: Standard I/O & Redirection Created by Brennen Bearnes Last updated on 2015-03-03 05:15:07 PM EST Guide Contents Guide Contents Overview Input & Output Standard I/O

More information

Oxford University Computing Services. Getting Started with Unix

Oxford University Computing Services. Getting Started with Unix Oxford University Computing Services Getting Started with Unix Unix c3.1/2 Typographical Conventions Listed below are the typographical conventions used in this guide. Names of keys on the keyboard are

More information

Unix Basics. Benjamin S. Skrainka University College London. July 17, 2010

Unix Basics. Benjamin S. Skrainka University College London. July 17, 2010 Unix Basics Benjamin S. Skrainka University College London July 17, 2010 Overview We cover basic Unix survival skills: Why you need some Unix in your life How to get some Unix in your life Basic commands

More information

UNIX Basics. UNIX Basics CIS 218 Oakton Community College

UNIX Basics. UNIX Basics CIS 218 Oakton Community College UNIX Basics UNIX Basics CIS 218 Oakton Community College History UNIX was invented in 1969 at AT&T Bell Labs Ken Thompson and Dennis Ritchie are credited as the original architects and developers of C.

More information

Linux File System and Basic Commands

Linux File System and Basic Commands Linux File System and Basic Commands 0.1 Files, directories, and pwd The GNU/Linux operating system is much different from your typical Microsoft Windows PC, and probably looks different from Apple OS

More information

Introduction to Unix and Linux. Workshop 1: Directories and Files

Introduction to Unix and Linux. Workshop 1: Directories and Files Introduction to Unix and Linux Workshop 1: Directories and Files Genomics Core Lab TEXAS A&M UNIVERSITY CORPUS CHRISTI Anvesh Paidipala, Evan Krell, Kelly Pennoyer, Chris Bird Genomics Core Lab Informatics

More information

Linux Interview Questions and Answers

Linux Interview Questions and Answers Linux Interview Questions and Answers You need to see the last fifteen lines of the files dog, cat and horse. What command should you use? tail -15 dog cat horse The tail utility displays the end of a

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

Disks, Filesystems 1

Disks, Filesystems 1 Disks, Filesystems 1 sudo and PATH (environment) disks partitioning formatting file systems: mkfs command checking file system integrity: fsck command /etc/fstab mounting file systems: mount command unmounting

More information

Chapter 11: File System Implementation. Objectives

Chapter 11: File System Implementation. Objectives Chapter 11: File System Implementation Objectives To describe the details of implementing local file systems and directory structures To describe the implementation of remote file systems To discuss block

More information

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Esercitazione Introduzione al linguaggio di shell

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Esercitazione Introduzione al linguaggio di shell Lezione 8 Bioinformatica Mauro Ceccanti e Alberto Paoluzzi Esercitazione Introduzione al linguaggio di shell Dip. Informatica e Automazione Università Roma Tre Dip. Medicina Clinica Università La Sapienza

More information

Chapter 1 An Introduction to C++, Unix, SSH and Komodo Edit

Chapter 1 An Introduction to C++, Unix, SSH and Komodo Edit Chapter 1 An Introduction to C++, Unix, SSH and Komodo Edit A portion of this lab is to be done during the scheduled lab time. The take-home programming assignment is to be turned in before the next lab;

More information

Chap2: Operating-System Structures

Chap2: Operating-System Structures Chap2: Operating-System Structures Objectives: services OS provides to users, processes, and other systems structuring an operating system how operating systems are designed and customized and how they

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

An Introduction to Cluster Computing Using Newton

An Introduction to Cluster Computing Using Newton An Introduction to Cluster Computing Using Newton Jason Harris and Dylan Storey March 25th, 2014 Jason Harris and Dylan Storey Introduction to Cluster Computing March 25th, 2014 1 / 26 Workshop design.

More information

Basic Linux Command Line Interface Guide

Basic Linux Command Line Interface Guide This basic Linux Command-Line Interface (CLI) Guide provides a general explanation of commonly used Bash shell commands for the Barracuda NG Firewall. You can access the command-line interface by connecting

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

M2PGER FORTRAN programming. General introduction. Virginie DURAND and Jean VIRIEUX 10/13/2013 M2PGER - ALGORITHME SCIENTIFIQUE

M2PGER FORTRAN programming. General introduction. Virginie DURAND and Jean VIRIEUX 10/13/2013 M2PGER - ALGORITHME SCIENTIFIQUE M2PGER 2013-2014 FORTRAN programming General introduction Virginie DURAND and Jean VIRIEUX 1 Why learning programming??? 2 Why learning programming??? ACQUISITION numerical Recording on magnetic supports

More information

UNIX files searching, and other interrogation techniques

UNIX files searching, and other interrogation techniques UNIX files searching, and other interrogation techniques Ways to examine the contents of files. How to find files when you don't know how their exact location. Ways of searching files for text patterns.

More information

stdin, stdout, stderr

stdin, stdout, stderr stdin, stdout, stderr stdout and stderr Many programs make output to "standard out" and "standard error" (e.g. the print command goes to standard out, error messages go to standard error). By default,

More information

Common File System Commands

Common File System Commands Common File System Commands ls! List names of all files in current directory ls filenames! List only the named files ls -t! List in time order, most recent first ls -l! Long listing, more information.

More information

CSCI 1100L: Topics in Computing Lab Lab 3: Windows Command Prompt

CSCI 1100L: Topics in Computing Lab Lab 3: Windows Command Prompt CSCI 1100L: Topics in Computing Lab Lab 3: Windows Command Prompt Purpose: So far in Lab, we ve played around and learned more about Windows 10 and the WIMP (Windows- Icons, Menus, Pointers) interface.

More information

Introduction. SSH Secure Shell Client 1

Introduction. SSH Secure Shell Client 1 SSH Secure Shell Client 1 Introduction An SSH Secure Shell Client is a piece of software that allows a user to do a number of functions. Some of these functions are: file transferring, setting permissions,

More information

Introduction to Linux

Introduction to Linux Introduction to Operating Systems All computers that we interact with run an operating system There are several popular operating systems Operating Systems OS consists of a suite of basic software Operating

More information

Chapter 2. Editing And Compiling

Chapter 2. Editing And Compiling Chapter 2. Editing And Compiling Now that the main concepts of programming have been explained, it's time to actually do some programming. In order for you to "edit" and "compile" a program, you'll need

More information

*nix Crash Course. Presented by: Virginia Tech Linux / Unix Users Group VTLUUG

*nix Crash Course. Presented by: Virginia Tech Linux / Unix Users Group VTLUUG *nix Crash Course Presented by: Virginia Tech Linux / Unix Users Group VTLUUG Ubuntu LiveCD No information on your hard-drive will be modified. Gives you a working Linux system without having to install

More information

Description of the Windows XP Recovery Console for advanced users

Description of the Windows XP Recovery Console for advanced users Page 1 of 11 Article ID: 314058 - Last Review: September 22, 2008 - Revision: 5.4 Description of the Windows XP Recovery Console for advanced users System Tip This article applies to a different version

More information

There is a general need for long-term and shared data storage: Files meet these requirements The file manager or file system within the OS

There is a general need for long-term and shared data storage: Files meet these requirements The file manager or file system within the OS Why a file system? Why a file system There is a general need for long-term and shared data storage: need to store large amount of information persistent storage (outlives process and system reboots) concurrent

More information

CSE 15L Winter Midterm :) Review

CSE 15L Winter Midterm :) Review CSE 15L Winter 2015 Midterm :) Review Makefiles Makefiles - The Overview Questions you should be able to answer What is the point of a Makefile Why don t we just compile it again? Why don t we just use

More information

CS395T: Introduction to Scientific and Technical Computing

CS395T: Introduction to Scientific and Technical Computing CS395T: Introduction to Scientific and Technical Computing Instructors: Dr. Karl W. Schulz, Research Associate, TACC Dr. Bill Barth, Research Associate, TACC Outline Continue with Unix overview File attributes

More information

Using the Command-Line Interface

Using the Command-Line Interface CHAPTER 1 The command-line interface (CLI) is a line-oriented user interface that has a set of commands for configuring, managing, and monitoring the CSS. To help you use these commands, this chapter provides

More information

Working with UNIX (mini-project: file manipulation/processing/visualization using UNIX)

Working with UNIX (mini-project: file manipulation/processing/visualization using UNIX) Informatik I Exercise 1 Working with UNIX (mini-project: file manipulation/processing/visualization using UNIX) Document version: 12.09.2017 Exercises week 1: 25.09.2017-08.10.2017 Exercises week 2: 09.10.2017-22.10.2017

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

Bash Check If Command Line Parameter Exists

Bash Check If Command Line Parameter Exists Bash Check If Command Line Parameter Exists How to enter the parameters on the command line for this shell script? exit 1 fi if $ERR, then echo $MSG exit 1 fi if ( -d "$NAME" ), then echo "Directory -

More information

Research. We make it happen. Unix Basics. User Support Group help-line: personal:

Research. We make it happen. Unix Basics. User Support Group help-line: personal: Research. We make it happen. Unix Basics Presented by: Patton Fast User Support Group help-line: help@msi.umn.edu 612-626-0802 personal: pfast@msi.umn.edu 612-625-6573 Outline I. Warnings! II. III. IV.

More information

Introduction to Unix

Introduction to Unix Introduction to Unix Part 1: Navigating directories First we download the directory called "Fisher" from Carmen. This directory contains a sample from the Fisher corpus. The Fisher corpus is a collection

More information

A Hands-On Tutorial: RNA Sequencing Using High-Performance Computing

A Hands-On Tutorial: RNA Sequencing Using High-Performance Computing A Hands-On Tutorial: RNA Sequencing Using Computing February 11th and 12th, 2016 1st session (Thursday) Preliminaries: Linux, HPC, command line interface Using HPC: modules, queuing system Presented by:

More information

Introduction in Unix. Linus Torvalds Ken Thompson & Dennis Ritchie

Introduction in Unix. Linus Torvalds Ken Thompson & Dennis Ritchie Introduction in Unix Linus Torvalds Ken Thompson & Dennis Ritchie My name: John Donners John.Donners@surfsara.nl Consultant at SURFsara And Cedric Nugteren Cedric.Nugteren@surfsara.nl Consultant at SURFsara

More information

Disks, Filesystems Todd Kelley CST8177 Todd Kelley 1

Disks, Filesystems Todd Kelley CST8177 Todd Kelley 1 Disks, Filesystems Todd Kelley kelleyt@algonquincollege.com CST8177 Todd Kelley 1 sudo and PATH (environment) disks partitioning formatting file systems: mkfs command checking file system integrity: fsck

More information

Implementation of a simple shell, xssh

Implementation of a simple shell, xssh Implementation of a simple shell, xssh What is a shell? A process that does command line interpretation Reads a command from standard input (stdin) Executes command corresponding to input line In simple

More information

2 Initialize a git repository on your machine, add a README file, commit and push

2 Initialize a git repository on your machine, add a README file, commit and push BioHPC Git Training Demo Script First, ensure that git is installed on your machine, and you have configured an ssh key. See the main slides for instructions. To follow this demo script open a terminal

More information

Introduction to UNIX Part II

Introduction to UNIX Part II T H E U N I V E R S I T Y of T E X A S H E A L T H S C I E N C E C E N T E R A T H O U S T O N S C H O O L of H E A L T H I N F O R M A T I O N S C I E N C E S Introduction to UNIX Part II For students

More information

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions Welcome to getting started with Ubuntu 12.04 Server. This System Administrator Manual guide to be simple to follow, with step by step instructions with screenshots INDEX 1.Installation of Ubuntu 12.04

More information

The Ultimate Linux/Windows System

The Ultimate Linux/Windows System The Ultimate Linux/Windows System Kevin Farnham Abstract Use cross-platform applications and shared data for the ultimate Linux/Windows system. I recently converted my Toshiba notebook computer into a

More information

Oracle EXAM - 1Z Oracle Solaris Certified Associate Exam. Buy Full Product.

Oracle EXAM - 1Z Oracle Solaris Certified Associate Exam. Buy Full Product. Oracle EXAM - 1Z0-876 Oracle Solaris Certified Associate Exam Buy Full Product http://www.examskey.com/1z0-876.html Examskey Oracle 1Z0-876 exam demo product is here for you to test the quality of the

More information

Introduction to Unix & Perl Programming 1

Introduction to Unix & Perl Programming 1 Introduction to Unix & Perl Programming 1 Bioinformatics: Issues and Algorithms CSE 308-408 Fall 2007 Lecture 4 Lopresti Fall 2007 Lecture 4-1 - Administrative notes Homework #1 has been posted on Blackboard

More information

Exercise 1: Basic Tools

Exercise 1: Basic Tools Exercise 1: Basic Tools This exercise is created so everybody can learn the basic tools we will use during this course. It is really more like a tutorial than an exercise and, you are not required to submit

More information

CMSC421: Principles of Operating Systems

CMSC421: Principles of Operating Systems CMSC421: Principles of Operating Systems Nilanjan Banerjee Assistant Professor, University of Maryland Baltimore County nilanb@umbc.edu http://www.csee.umbc.edu/~nilanb/teaching/421/ Principles of Operating

More information