lsx [ls_options ] [names]

Size: px
Start display at page:

Download "lsx [ls_options ] [names]"

Transcription

1 NAME ls, lc, l, ll, lsf, lsr, lsx - list contents of directories SYNOPSIS ls [-abcdefgilmnopqrstuxacfhlr1] [names] lc [-abcdefgilmnopqrstuxacfhlr1] [names] l [ls_options ] [names] ll [ls_options ] [names] lsf [ls_options ] [names] lsr [ls_options ] [names] lsx [ls_options ] [names] DESCRIPTION For each directory argument, the ls command lists the contents of the directory. For each file argument, ls repeats its name and any other information requested. The output is sorted in ascending collation order by default (see Environment Variables below). When no argument is given, the current directory is listed. When several arguments are given, the arguments are first sorted appropriately, but file arguments appear before directories and their contents. If you are a user with appropriate privileges, all files except. and.. are listed by default. There are three major listing formats. The format chosen depends on whether the output is going to a login device (determined by whether output device file is a tty device), and can also be controlled by option flags. The default format for a login device is to list the contents of directories in multicolumn format, with entries sorted vertically by column. (When individual file names (as opposed to directory names) appear in the argument list, those file names are always sorted across the page rather than down the page in columns because individual file names can be arbitrarily long.) If the standard output is not a login device, the default format is to list one entry per line. The -C and -x options enable multicolumn formats, and the -m option enables stream output format in which files are listed across the page, separated by commas. In order to determine output formats for the -C, -x, and -m options, ls uses an environment variable, COLUMNS, to determine the number of character positions available on each output line. If this variable is not set, the terminfo database is used to determine the number of columns, based on the environment variable TERM. If this information cannot be obtained, 80 columns is assumed. The command lc functions the same as ls except that the lc default output is columnar, even if output is redirected. Options ls recognizes the following options: -a List all entries; usually entries whose names begin with a period (.) are not listed. -b List nonprinting characters in the octal \ddd notation. -c Use time of last modification of the inode (file created, mode changed, etc.) for sorting (-t) or printing (-l (ell)). -d If an argument is a directory, list only its name (not its contents); often used with -l (ell) to get the status of a directory. Under the UNIX 2003 environment (see standards (5)), ls with -d does not follow symbolic links unless the -H or -L option is specified. -e List the extent attributes of the file. If any of the files has a extent attribute, this option lists the extent size, space reserved and allocation flags. This option must be used with the -l (ell) option. -f Interpret each argument as a directory and list the name found in each slot. This option disables -l (ell), -r, -s, and -t, and enables -a; the order is the order in which entries appear in the directory. -g Same as -l (ell), except that only the group is printed (owner is omitted). If both -l (ell) and -g are specified, the owner is not printed. HP-UX 11i Version 3: September Hewlett-Packard Company 1

2 -i For each file, list the inode number in the first column of the report. When used in multicolumn output, the number precedes the file name in each column. -l (ell) List in long format, giving mode, number of links, owner, group, size in bytes, and time of last modification for each file (see further DESCRIPTION and Access Control Lists below). If the time of last modification is greater than six months ago, or any time in the future, the year is substituted for the hour and minute of the modification time. If the file is a special file, the size field contains the major and minor device numbers rather than a size. If the file is a symbolic link, the filename is printed, followed by -> and the pathname of the referenced file. Under the UNIX 2003 environment (see standards (5)), ls with -l does not follow symbolic links unless the -H or -L option is specified. -m Stream output format. -n The same as -l, (ell) except that the owner s UID and group s GID numbers are printed, rather than the associated character strings. -o The same as -l, (ell) except that only the owner is printed (group is omitted). (If both -l (ell) and -o are specified, the group is not printed). -p Put a slash (/) after each file name if that file is a directory. -q List nonprinting characters in file names as the character (?). -r Reverse the order of sort to get reverse (descending) collation or oldest first, as appropriate. -s List size in blocks of 512-byte units, including indirect blocks, for each entry. The first entry listed is the total number of blocks in the directory. When used in multicolumn output, the number of blocks precedes the file name in each column. The number of indirect blocks in a file is filesystem dependent. -t Sort by time modified (latest first) before sorting alphabetically. -u Use time of last access instead of last modification for sorting (-t option) or printing (-l (ell) option). -x List multicolumn output with entries sorted across rather than down the page. -A The same as -a, except that the current directory. and parent directory.. are not listed. For a user with appropriate privileges, this flag defaults to on, and is turned off by -A. -C List multicolumn output with entries sorted down the columns. -F After each file name, put one of: A slash (/) if the file is a directory or a symbolic link to a directory. An asterisk (*) if the file is executable; An at-sign (@) if the file is a symbolic link to a file; A vertical bar ( ) if the file is a fifo. Under the UNIX 2003 environment (see standards (5)), ls with -F does not follow symbolic links unless the -H or -L option is specified. -H If a symbolic link referencing a file of type directory is specified on the command line, ls evaluates the file information and file type to be those of the file referenced by the link, and not the link itself. However, ls writes the name of the link itself and not the file referenced by the link. -L Evaluate the file information and file type for all symbolic links (whether named on the command line or encountered in a file hierarchy) to be those of the file referenced by the link, and not the link itself. However, ls writes the name of the link itself and not the file referenced by the link. When -L is used with -l, write the contents of symbolic links in the long format. -R Recursively list subdirectories encountered. -1 (one) List the file names in single column format regardless of the output device. This forces single column format to the user s terminal. Specifying more than one of the options in the following mutually exclusive pairs is not considered an error: -C and -l (ell), -m and -l (ell), -x and -l (ell), -C and -1 (one), -H and -L, and -c and -u. ls is known by several shorthand-version names for the various formats: 2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010

3 l is equivalent to ls -m ll is equivalent to ls -l (ell) lsf is equivalent to ls -F lsr is equivalent to ls -R lsx is equivalent to ls -x The shorthand notations are implemented as links to ls. Option arguments to the shorthand versions behave exactly as if the long form above had been used with the additional arguments. Mode Bits Interpretation (-l option) The mode printed in listings produced by the -l (ell) option consists of 10 characters, for example, -rwxr-xr-x. The first character indicates the entry type: b Block special file c Character special file d Directory l Symbolic link n Network special file p Fifo (also called a "named pipe") special file s Socket - Ordinary file The next 9 characters are interpreted as three sets of three characters each which identify access and execution permissions for the owner, group, and others categories, as described in chmod(1). The - indicates the permission is not granted. The various permissions can be put together in any combination, except that the x, s, S, t, and T characters are mutually exclusive, as implied below. -r Read by owner --w Write by owner ---x Execute (or search directory) by owner; do not set user ID on execution ---s Execute/search by owner; set user ID on execution ---S No execute/search by owner; set user ID on execution ----r----- Read by group -----w---- Write by group x--- Execute/search by group; do not set group ID on execution s--- Execute/search by group; set group ID on execution S--- No execute/search by group; set group ID on execution r-- Read by others w- Write by others x Execute/search by others; do not set sticky bit on execution t Execute/search by others; set sticky bit on execution T No execute/search by others; set sticky bit on execution The mode characters are interpreted as follows: - Deny all permissions in the corresponding position. r Grant read permission to the corresponding user class. w Grant write permission to the corresponding user class. x Grant execute (or search in directory) permission to the corresponding user class. s Grant execute (search) permission to the corresponding user class. Execute the file as if by the owner (set user ID, SUID) or group (set group ID, SGID), as indicated by position. S Deny execute (search) permission to the corresponding user class. Execute the file as if by the owner (set user ID, SUID) or group (set group ID, SGID), as indicated by position. t Grant execute (search) permission to others. The "sticky" bit is set (see the description of S_ISVTX in chmod(2)). T Deny execute (search directory) permission to others. The "sticky" bit is set. When an option is specified that results in a listing of directory and/or file sizes in bytes or blocks (such as the -s or -l (ell) option), a total count of blocks, including indirect blocks, is also printed at the beginning of the listing. HP-UX 11i Version 3: September Hewlett-Packard Company 3

4 Access Control Lists (ACLs) If a file has optional ACL entries, the -l (ell) option displays a plus sign (+) after the file s permissions. The permissions shown are a summary representation of the file s access control list, as returned by stat() in the st_mode field (see stat (2)). To list the contents of an access control list, use the lsacl command (see lsacl (1) and acl(5)) for HFS file systems, or the getacl command (see getacl (1) and aclv (5)) for JFS file systems. EXTERNAL INFLUENCES For information about the UNIX standard environment, see standards (5). Environment Variables If the COLUMNS variable is set, ls uses the width provided in determining positioning of columnar output. LANG determines the locale to use for the locale categories when both LC_ALL and the corresponding environment variable (beginning with LC_) do not specify a locale. If LANG is not set or is null, it defaults to C (see lang(5)). LC_COLLATE determines the order in which the output is sorted. LC_CTYPE determines which characters are classified as nonprinting for the -b and -q options, and the interpretation of single- and/or multibyte characters within file names. LC_TIME determines the date and time strings output by the -g, -l (ell), -n, and -o options. LC_MESSAGES determines the language in which messages (other than the date and time strings) are displayed. If any internationalization variable contains an invalid setting, they all default to C (see environ (5)). International Code Set Support Single- and multibyte character code sets are supported. RETURN VALUE ls exits with one of the following values: 0 All input files were listed successfully. >0 ls was aborted because errors occurred when accessing files. The following conditions cause an error: Specified file not found. User has no permission to read the directory. Process could not get enough memory. Invalid option specified. EXAMPLES Print a long listing of all the files in the current working directory (including the file sizes). List the most recently modified (youngest) file first, followed by the next older file, and so forth, to the oldest. Files whose names begin with a. are also printed. ls -alst WARNINGS Setting options based on whether the output is a login (tty ) device is undesirable because ls -s is very different from ls -s lp. On the other hand, not using this setting makes old shell scripts that used ls almost inevitably fail. Nonprinting characters in file names (without the -b or -q option) may cause columnar output to be misaligned. DEPENDENCIES NFS The -l (ell) option does not display a plus sign (+) after the access permission bits of networked files to represent existence of optional access control list entries. AUTHOR ls was developed by AT&T, the University of California, Berkeley and HP. 4 Hewlett-Packard Company 4 HP-UX 11i Version 3: September 2010

5 FILES /etc/group /etc/passwd /usr/share/lib/terminfo/?/* For group IDs for -l (ell) and -g. For user IDs for -l (ell) and -o. For terminal information. SEE ALSO chmod(1), find(1), getacl(1), lsacl(1), stat(2), acl(5), aclv(5), standards(5). STANDARDS CONFORMANCE ls: SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2 HP-UX 11i Version 3: September Hewlett-Packard Company 5

6 (Notes) (Notes) 6 Hewlett-Packard Company 1 HP-UX 11i Version 3: September 2010

User Commands ls ( 1 )

User Commands ls ( 1 ) NAME ls list contents of directory SYNOPSIS /usr/bin/ls [-aabccdffghillmnopqrrstux1@] [file...] /usr/xpg4/bin/ls [-aabccdffghillmnopqrrstux1@] [file...] DESCRIPTION For each file that is a directory, ls

More information

5/8/2012. Encryption-based Protection. Protection based on Access Permission (Contd) File Security, Setting and Using Permissions Chapter 9

5/8/2012. Encryption-based Protection. Protection based on Access Permission (Contd) File Security, Setting and Using Permissions Chapter 9 File Security, Setting and Using Permissions Chapter 9 To show the three protection and security mechanisms that UNIX provides To describe the types of users of a UNIX file To discuss the basic operations

More information

User Commands find ( 1 )

User Commands find ( 1 ) NAME find find files SYNOPSIS /usr/bin/find path... expression /usr/xpg4/bin/find path... expression DESCRIPTION The find utility recursively descends the directory hierarchy for each path seeking files

More information

Files (review) and Regular Expressions. Todd Kelley CST8207 Todd Kelley 1

Files (review) and Regular Expressions. Todd Kelley CST8207 Todd Kelley 1 Files (review) and Regular Expressions Todd Kelley kelleyt@algonquincollege.com CST8207 Todd Kelley 1 midterms (Feb 11 and April 1) Files and Permissions Regular Expressions 2 Sobel, Chapter 6 160_pathnames.html

More information

User Commands chmod ( 1 )

User Commands chmod ( 1 ) NAME chmod change the permissions mode of a file SYNOPSIS chmod [-fr] absolute-mode file... chmod [-fr] symbolic-mode-list file... DESCRIPTION The chmod utility changes or assigns the mode of a file. The

More information

File Commands. Objectives

File Commands. Objectives File Commands Chapter 2 SYS-ED/Computer Education Techniques, Inc. 2: 1 Objectives You will learn: Purpose and function of file commands. Interrelated usage of commands. SYS-ED/Computer Education Techniques,

More information

5/8/2012. Creating and Changing Directories Chapter 7

5/8/2012. Creating and Changing Directories Chapter 7 Creating and Changing Directories Chapter 7 Types of files File systems concepts Using directories to create order. Managing files in directories. Using pathnames to manage files in directories. Managing

More information

bash startup files Linux/Unix files stty Todd Kelley CST8207 Todd Kelley 1

bash startup files Linux/Unix files stty Todd Kelley CST8207 Todd Kelley 1 bash startup files Linux/Unix files stty Todd Kelley kelleyt@algonquincollege.com CST8207 Todd Kelley 1 midterms (Feb 27 and April 10) bash startup files More Linux Files review stty 2 We customize our

More information

UNIX File Hierarchy: Structure and Commands

UNIX File Hierarchy: Structure and Commands UNIX File Hierarchy: Structure and Commands The UNIX operating system organizes files into a tree structure with a root named by the character /. An example of the directory tree is shown below. / bin

More information

PESIT Bangalore South Campus

PESIT Bangalore South Campus INTERNAL ASSESSMENT TEST - 2 Date : 20/09/2016 Max Marks : 0 Subject & Code : Unix Shell Programming (15CS36) Section : 3 rd Sem ISE/CSE Name of faculty : Prof Ajoy Time : 11:30am to 1:00pm SOLUTIONS 1

More information

- c list The list specifies character positions.

- c list The list specifies character positions. CUT(1) BSD General Commands Manual CUT(1)... 1 PASTE(1) BSD General Commands Manual PASTE(1)... 3 UNIQ(1) BSD General Commands Manual UNIQ(1)... 5 HEAD(1) BSD General Commands Manual HEAD(1)... 7 TAIL(1)

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

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

Introduction to Computer Security

Introduction to Computer Security Introduction to Computer Security UNIX Security Pavel Laskov Wilhelm Schickard Institute for Computer Science Genesis: UNIX vs. MULTICS MULTICS (Multiplexed Information and Computing Service) a high-availability,

More information

I/O and Shell Scripting

I/O and Shell Scripting I/O and Shell Scripting File Descriptors Redirecting Standard Error Shell Scripts Making a Shell Script Executable Specifying Which Shell Will Run a Script Comments in Shell Scripts File Descriptors Resources

More information

Outline. UNIX security ideas Users and groups File protection Setting temporary privileges. Examples. Permission bits Program language components

Outline. UNIX security ideas Users and groups File protection Setting temporary privileges. Examples. Permission bits Program language components UNIX security Ulf Larson (modified by Erland Jonsson/Magnus Almgren) Computer security group Dept. of Computer Science and Engineering Chalmers University of Technology, Sweden Outline UNIX security ideas

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

User Commands tar ( 1 )

User Commands tar ( 1 ) NAME tar create tape archives and add or extract files SYNOPSIS tar c [ bbeeffhiklnoppqvwx@ [0-7]] [block] [tarfile] [exclude-file] {-I include-file -C directory file file}... tar r [ bbeeffhiklnqvw@ [0-7]]

More information

Appendix A GLOSSARY. SYS-ED/ Computer Education Techniques, Inc.

Appendix A GLOSSARY. SYS-ED/ Computer Education Techniques, Inc. Appendix A GLOSSARY SYS-ED/ Computer Education Techniques, Inc. $# Number of arguments passed to a script. $@ Holds the arguments; unlike $* it has the capability for separating the arguments. $* Holds

More information

Basic File Attributes

Basic File Attributes Basic File Attributes The UNIX file system allows the user to access other files not belonging to them and without infringing on security. A file has a number of attributes (properties) that are stored

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

Privileges: who can control what

Privileges: who can control what Privileges: who can control what Introduction to Unix May 24, 2008, Morocco Hervey Allen Goal Understand the following: The Unix security model How a program is allowed to run Where user and group information

More information

User Commands sed ( 1 )

User Commands sed ( 1 ) NAME sed stream editor SYNOPSIS /usr/bin/sed [-n] script [file...] /usr/bin/sed [-n] [-e script]... [-f script_file]... [file...] /usr/xpg4/bin/sed [-n] script [file...] /usr/xpg4/bin/sed [-n] [-e script]...

More information

Operating system security models

Operating system security models Operating system security models Unix security model Windows security model MEELIS ROOS 1 General Unix model Everything is a file under a virtual root diretory Files Directories Sockets Devices... Objects

More information

Operating system security

Operating system security Operating system security Tuomas Aura T-110.4206 Information security technology Aalto University, autumn 2011 Outline Access control models in operating systems: 1. Unix 2. Windows Acknowledgements: This

More information

Contents. Volume 1 Base Definitions, Issue

Contents. Volume 1 Base Definitions, Issue Volume 1 Base Definitions, Issue 7... 1 Chapter 1 Introduction... 3 1.1 Scope... 3 1.2 Conformance... 4 1.3 Normative References... 4 1.4 Change History... 5 1.5 Terminology... 5 1.6 Definitions and Concepts...

More information

find Command as Admin Security Tool

find Command as Admin Security Tool find Command as Admin Security Tool Dr. Bill Mihajlovic INCS-620 Operating Systems Security find Command find command searches for the file or files that meet certain condition. like: Certain name Certain

More information

Unix Internal Assessment-2 solution. Ans:There are two ways of starting a job in the background with the shell s & operator and the nohup command.

Unix Internal Assessment-2 solution. Ans:There are two ways of starting a job in the background with the shell s & operator and the nohup command. Unix Internal Assessment-2 solution 1 a.explain the mechanism of process creation. Ans: There are three distinct phases in the creation of a process and uses three important system calls viz., fork, exec,

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

Chapter 1 - Introduction. September 8, 2016

Chapter 1 - Introduction. September 8, 2016 Chapter 1 - Introduction September 8, 2016 Introduction Overview of Linux/Unix Shells Commands: built-in, aliases, program invocations, alternation and iteration Finding more information: man, info Help

More information

CptS 360 (System Programming) Unit 6: Files and Directories

CptS 360 (System Programming) Unit 6: Files and Directories CptS 360 (System Programming) Bob Lewis School of Engineering and Applied Sciences Washington State University Spring, 2019 Motivation Need to know your way around a filesystem. A properly organized filesystem

More information

Basic Unix Command. It is used to see the manual of the various command. It helps in selecting the correct options

Basic Unix Command. It is used to see the manual of the various command. It helps in selecting the correct options Basic Unix Command The Unix command has the following common pattern command_name options argument(s) Here we are trying to give some of the basic unix command in Unix Information Related man It is used

More information

5/20/2007. Touring Essential Programs

5/20/2007. Touring Essential Programs Touring Essential Programs Employing fundamental utilities. Managing input and output. Using special characters in the command-line. Managing user environment. Surveying elements of a functioning system.

More information

Files

Files http://www.cs.fsu.edu/~langley/cop3353-2013-1/reveal.js-2013-02-11/02.html?print-pdf 02/11/2013 10:55 AM Files A normal "flat" file is a collection of information. It's usually stored somewhere reasonably

More information

Basic File Attributes

Basic File Attributes Basic File Attributes The UNIX file system allows the user to access other files not belonging to them and without infringing on security. A file has a number of attributes (properties) that are stored

More information

AC109/AT109 UNIX & SHELL PROGRAMMING DEC 2014

AC109/AT109 UNIX & SHELL PROGRAMMING DEC 2014 Q.2 a. Explain the principal components: Kernel and Shell, of the UNIX operating system. Refer Page No. 22 from Textbook b. Explain absolute and relative pathnames with the help of examples. Refer Page

More information

8. Files and File Systems

8. Files and File Systems 8. Files and File Systems 8. Files and File Systems File Storage Structure File System Implementation Kernel Abstraction Communication Through a Pipe 146 / 303 8. Files and File Systems Disk Operation

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

Files and Directories

Files and Directories Files and Directories Stat functions Given pathname, stat function returns structure of information about file fstat function obtains information about the file that is already open lstat same as stat

More information

CS/CIS 249 SP18 - Intro to Information Security

CS/CIS 249 SP18 - Intro to Information Security Lab assignment CS/CIS 249 SP18 - Intro to Information Security Lab #2 - UNIX/Linux Access Controls, version 1.2 A typed document is required for this assignment. You must type the questions and your responses

More information

LPI LPI Level Junior Level Linux Certification Part 1 of 2. Download Full Version :

LPI LPI Level Junior Level Linux Certification Part 1 of 2. Download Full Version : LPI 101-400 LPI Level 1 101 Junior Level Linux Certification Part 1 of 2 Download Full Version : http://killexams.com/pass4sure/exam-detail/101-400 Answer: B QUESTION: 102 How many fields are in a syntactically

More information

CSE II-Sem)

CSE II-Sem) a) Write a shell script that displays a list of all the files in the current directory to which the user has read, write and execute permissions. b) Develop an interactive script that asks for a word and

More information

CSC209H Lecture 1. Dan Zingaro. January 7, 2015

CSC209H Lecture 1. Dan Zingaro. January 7, 2015 CSC209H Lecture 1 Dan Zingaro January 7, 2015 Welcome! Welcome to CSC209 Comments or questions during class? Let me know! Topics: shell and Unix, pipes and filters, C programming, processes, system calls,

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

Processes are subjects.

Processes are subjects. Identification and Authentication Access Control Other security related things: Devices, mounting filesystems Search path TCP wrappers Race conditions NOTE: filenames may differ between OS/distributions

More information

Operating Systems. Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) alphapeeler.sf.net/pubkeys/pkey.htm

Operating Systems. Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) alphapeeler.sf.net/pubkeys/pkey.htm Operating Systems Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) armahmood786@yahoo.com alphasecure@gmail.com alphapeeler.sf.net/pubkeys/pkey.htm http://alphapeeler.sourceforge.net pk.linkedin.com/in/armahmood

More information

commandname flags arguments

commandname flags arguments Unix Review, additional Unix commands CS101, Mock Introduction This handout/lecture reviews some basic UNIX commands that you should know how to use. A more detailed description of this and other commands

More information

CS246 Spring14 Programming Paradigm Notes on Linux

CS246 Spring14 Programming Paradigm Notes on Linux 1 Unix History 1965: Researchers from Bell Labs and other organizations begin work on Multics, a state-of-the-art interactive, multi-user operating system. 1969: Bell Labs researchers, losing hope for

More information

The UNIX File System

The UNIX File System The UNIX File System Magnus Johansson May 9, 2007 1 UNIX file system A file system is created with mkfs. It defines a number of parameters for the system, such as: bootblock - contains a primary boot program

More information

General Access Control Model for DAC

General Access Control Model for DAC General Access Control Model for DAC Also includes a set of rules to modify access control matrix Owner access right Control access right The concept of a copy flag (*) Access control system commands General

More information

CSC UNIX System, Spring 2015

CSC UNIX System, Spring 2015 CSC 352 - UNIX System, Spring 2015 Study guide for the CSC352 midterm exam (20% of grade). Dr. Dale E. Parson, http://faculty.kutztown.edu/parson We will have a midterm on March 19 on material we have

More information

Files and Directories

Files and Directories CSCI 2132: Software Development Files and Directories Norbert Zeh Faculty of Computer Science Dalhousie University Winter 2019 Files and Directories Much of the operation of Unix and programs running on

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

CSE/ISE 311: Systems Administra5on Access Control and Processes

CSE/ISE 311: Systems Administra5on Access Control and Processes Access Control and Processes Por$ons courtesy Ellen Liu Outline Access control Tradi$onal UNIX access control File system access control; File permissions, Some commands; The root account Modern access

More information

Introduction. Let s start with the first set of slides

Introduction. Let s start with the first set of slides Tux Wars Class - 1 Table of Contents 1) Introduction to Linux and its history 2) Booting process of a linux system 3) Linux Kernel 4) What is a shell 5) Bash Shell 6) Anatomy of command 7) Let s make our

More information

Unix/Linux Primer. Taras V. Pogorelov and Mike Hallock School of Chemical Sciences, University of Illinois

Unix/Linux Primer. Taras V. Pogorelov and Mike Hallock School of Chemical Sciences, University of Illinois Unix/Linux Primer Taras V. Pogorelov and Mike Hallock School of Chemical Sciences, University of Illinois August 25, 2017 This primer is designed to introduce basic UNIX/Linux concepts and commands. No

More information

Welcome to Linux. Lecture 1.1

Welcome to Linux. Lecture 1.1 Welcome to Linux Lecture 1.1 Some history 1969 - the Unix operating system by Ken Thompson and Dennis Ritchie Unix became widely adopted by academics and businesses 1977 - the Berkeley Software Distribution

More information

1Z Oracle Linux Fundamentals (Oracle Partner Network) Exam Summary Syllabus Questions

1Z Oracle Linux Fundamentals (Oracle Partner Network) Exam Summary Syllabus Questions 1Z0-409 Oracle Linux Fundamentals (Oracle Partner Network) Exam Summary Syllabus Questions Table of Contents Introduction to 1Z0-409 Exam on Oracle Linux Fundamentals (Oracle Partner Network)... 2 Oracle

More information

CS631 - Advanced Programming in the UNIX Environment

CS631 - Advanced Programming in the UNIX Environment CS631 - Advanced Programming in the UNIX Environment Slide 1 CS631 - Advanced Programming in the UNIX Environment Files and Directories Department of Computer Science Stevens Institute of Technology Jan

More information

Processes are subjects.

Processes are subjects. Identification and Authentication Access Control Other security related things: Devices, mounting filesystems Search path Race conditions NOTE: filenames may differ between OS/distributions Principals

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

Operating Systems Lab

Operating Systems Lab Operating Systems Lab Islamic University Gaza Engineering Faculty Department of Computer Engineering Fall 2012 ECOM 4010: Operating Systems Lab Eng: Ahmed M. Ayash Lab # 4 Paths, Links & File Permissions

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

Bash Reference Manual Reference Documentation for Bash Edition 2.5b, for Bash Version 2.05b. July 2002

Bash Reference Manual Reference Documentation for Bash Edition 2.5b, for Bash Version 2.05b. July 2002 .tex Bash Reference Manual Reference Documentation for Bash Edition 2.5b, for Bash Version 2.05b. July 2002 Chet Ramey, Case Western Reserve University Brian Fox, Free Software Foundation Copyright c 1991-2002

More information

CS 307: UNIX PROGRAMMING ENVIRONMENT FIND COMMAND

CS 307: UNIX PROGRAMMING ENVIRONMENT FIND COMMAND CS 307: UNIX PROGRAMMING ENVIRONMENT FIND COMMAND Prof. Michael J. Reale Fall 2014 Finding Files in a Directory Tree Suppose you want to find a file with a certain filename (or with a filename matching

More information

Answers to Even- Numbered Exercises

Answers to Even- Numbered Exercises Answers to Even- 17 Numbered Exercises from page 1077 1. What option should you use with fsck if you want to review the status of your filesystems without making any changes to them? How does fsck determine

More information

ADVANCED OPERATING SYSTEMS

ADVANCED OPERATING SYSTEMS ADVANCED OPERATING SYSTEMS UNIT I INTRODUCTION TO UNIX/LINUX KERNEL BY MR.PRASAD SAWANT Prof.Prasad Sawant,Assitiant Professor,Dept. Of CS PCCCS PREREQUISITES: 1. Working knowledge of C programming. 2.

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

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

INTERNAL REPRESENTATION OF FILES:

INTERNAL REPRESENTATION OF FILES: INTERNAL REPRESENTATION OF FILES: Every file on a UNIX system has a unique inode. The inode contains the information necessary for a process to access a file, such as file ownership, access rights, file

More information

pv_path The block device path name of a physical volume.

pv_path The block device path name of a physical volume. NAME pvdisplay - display information about physical volumes in LVM volume groups SYNOPSIS /usr/sbin/pvdisplay [-v] [-d] [-b BlockList ] pv_path... /usr/sbin/pvdisplay -l [-u] pv_path... /usr/sbin/pvdisplay

More information

Commands are in black

Commands are in black Starting From the Shell Prompt (Terminal) Commands are in black / +--------+---------+-------+---------+---------+------ +------ +------ +------ +------ +------ +-- Bin boot dev etc home media sbin bin

More information

Project 5 File System Protection

Project 5 File System Protection Project 5 File System Protection Introduction This project will implement simple protection in the xv6 file system. Your goals are to: 1. Implement protection in the xv6 file system. 2. Understand how

More information

Securing Unix Filesystems - When Good Permissions Go Bad

Securing Unix Filesystems - When Good Permissions Go Bad Securing Unix Filesystems - When Good Permissions Go Bad Introduction Unix has a very elegant and flexible permission system at the heart of its filesystem security. These permissions allow and/or disallow

More information

22-Sep CSCI 2132 Software Development Lecture 8: Shells, Processes, and Job Control. Faculty of Computer Science, Dalhousie University

22-Sep CSCI 2132 Software Development Lecture 8: Shells, Processes, and Job Control. Faculty of Computer Science, Dalhousie University Lecture 8 p.1 Faculty of Computer Science, Dalhousie University CSCI 2132 Software Development Lecture 8: Shells, Processes, and Job Control 22-Sep-2017 Location: Goldberg CS 127 Time: 14:35 15:25 Instructor:

More information

Code Coverage. Copyright 2009 JADE Software Corporation Limited. All rights reserved.

Code Coverage. Copyright 2009 JADE Software Corporation Limited. All rights reserved. Code Coverage JADE Software Corporation Limited cannot accept any financial or other responsibilities that may be the result of your use of this information or software material, including direct, indirect,

More information

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories Chapter Two Exploring the UNIX File System and File Security Lesson A Understanding Files and Directories 2 Objectives Discuss and explain the UNIX file system Define a UNIX file system partition Use the

More information

Lecture 2b. Pathnames, files, special characters in filenames, and file permissions. COP 3353 Introduction to UNIX, FALL 2013

Lecture 2b. Pathnames, files, special characters in filenames, and file permissions. COP 3353 Introduction to UNIX, FALL 2013 Lecture 2b Pathnames, files, special characters in filenames, and file permissions. COP 3353 Introduction to UNIX, FALL 2013 Files Files A well defined repository of information Program or component of

More information

SECTION -C. Getting Started with UNIX

SECTION -C. Getting Started with UNIX Lecture 15 SECTION -C Getting Started with UNIX Introduction Changing permission modes Absolute & Relative Permissions Changing file permissions : chmod A file or directory is created with a default set

More information

GNU CPIO September by Robert Carleton and Sergey Poznyakoff

GNU CPIO September by Robert Carleton and Sergey Poznyakoff GNU CPIO 2.12 12 September 2015 by Robert Carleton and Sergey Poznyakoff This manual documents GNU cpio (version 2.12, 12 September 2015). Copyright c 1995, 2001-2002, 2004, 2010, 2014-2015 Free Software

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

INSE 6130 Operating System Security. Overview of Design Principles

INSE 6130 Operating System Security. Overview of Design Principles INSE 6130 Operating System Security Design Principles Prof. Lingyu Wang 1 Overview of Design Principles Design principles Time-proven guidelines For implementing security mechanisms/systems Rooted in simplicity

More information

Before assigning a physical volume to a volume group, the physical volume has to be created using the pvcreate command (see pvcreate (1M)).

Before assigning a physical volume to a volume group, the physical volume has to be created using the pvcreate command (see pvcreate (1M)). NAME vgcreate - create LVM volume group SYNOPSIS /usr/sbin/vgcreate [-V 1.0] [-f] [-A autobackup ] [-x extensibility] [-e max_pe] [-l max_lv] [-p max_pv] [-s pe_size ] [-g pvg_name ] vg_name pv_path...

More information

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version... Contents Note: pay attention to where you are........................................... 1 Note: Plaintext version................................................... 1 Hello World of the Bash shell 2 Accessing

More information

NAME attr extended attributes on XFS filesystem objects. SYNOPSIS attr [ LRq ] s attrname [ V attrvalue ] pathname

NAME attr extended attributes on XFS filesystem objects. SYNOPSIS attr [ LRq ] s attrname [ V attrvalue ] pathname ATTR(1) XFS Compatibility API ATTR(1) attr extended attributes on XFS filesystem objects SYNOPSIS attr [ LRq ] s attrname [ V attrvalue ] pathname attr [ LRq ] g attrname pathname attr [ LRq ] r attrname

More information

Permission and Ownership

Permission and Ownership Permission and Ownership 1. Understanding file and directory ownership Every file on your Linux system, including directories, is owned by a specific user and group. Therefore, file permissions are defined

More information

Roll No. :... Invigilator's Signature : UNIX AND SHELL PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70

Roll No. :... Invigilator's Signature : UNIX AND SHELL PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70 Name : Roll No. :... Invigilator's Signature :. CS/BCA/SEM-5/BCA-502/2011-12 2011 UNIX AND SHELL PROGRAMMING Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks. Candidates

More information

Assume that username is cse. The user s home directory will be /home/cse. You may remember what the relative pathname for users home directory is: ~

Assume that username is cse. The user s home directory will be /home/cse. You may remember what the relative pathname for users home directory is: ~ Introduction to Open Source Software Development Spring semester, 2017 School of Computer Science and Engineering, Pusan National University Joon-Seok Kim LINUX: COMMANDS Review Lab #1 2 Create Directories

More information

Table 12.2 Information Elements of a File Directory

Table 12.2 Information Elements of a File Directory Table 12.2 Information Elements of a File Directory Basic Information File Name File Type File Organization Name as chosen by creator (user or program). Must be unique within a specific directory. For

More information

UNIX Kernel. UNIX History

UNIX Kernel. UNIX History UNIX History UNIX Kernel 1965-1969 Bell Labs participates in the Multics project. 1969 Ken Thomson develops the first UNIX version in assembly for an DEC PDP-7 1973 Dennis Ritchie helps to rewrite UNIX

More information

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

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

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

Information technology Portable Operating System Interface (POSIX ) Part 3: Shell and Utilities

Information technology Portable Operating System Interface (POSIX ) Part 3: Shell and Utilities INTERNATIONAL STANDARD ISO/IEC 9945-3:2003 TECHNICAL CORRIGENDUM 1 Published 2004-09-15 INTERNATIONAL ORGANIZATION FOR STANDARDIZATION МЕЖДУНАРОДНАЯ ОРГАНИЗАЦИЯ ПО СТАНДАРТИЗАЦИИ ORGANISATION INTERNATIONALE

More information

Hardware. Ahmet Burak Can Hacettepe University. Operating system. Applications programs. Users

Hardware. Ahmet Burak Can Hacettepe University. Operating system. Applications programs. Users Operating System Security Ahmet Burak Can Hacettepe University abc@hacettepe.edu.tr Computer System Components Hardware Provides basic computing resources (CPU, memory, I/O devices). Operating system Controls

More information

CIFS/9000 Server File Locking Interoperability

CIFS/9000 Server File Locking Interoperability CIFS/9000 Server File Locking Interoperability Version 1.03 September, 2001 Updates for version 1.03: * Chapters 5, 6, 7, 8 CIFS/9000 Open Mode locking added * Appendix B CIFS/9000 Open Mode locking added

More information

I/O OPERATIONS. UNIX Programming 2014 Fall by Euiseong Seo

I/O OPERATIONS. UNIX Programming 2014 Fall by Euiseong Seo I/O OPERATIONS UNIX Programming 2014 Fall by Euiseong Seo Files Files that contain a stream of bytes are called regular files Regular files can be any of followings ASCII text Data Executable code Shell

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

Seeing file permission/ownership ls -l (Shows the long listing of a file/directory, which allows you to see file permission & ownership)

Seeing file permission/ownership ls -l (Shows the long listing of a file/directory, which allows you to see file permission & ownership) Objective 104.5 Manage file permission and ownership by Christine Bresnahan: Christine-Bresnahan.com Manage access permissions on regular and special files as well as directories. Use access modes such

More information

Code Coverage White Paper VERSION Copyright 2018 Jade Software Corporation Limited. All rights reserved.

Code Coverage White Paper VERSION Copyright 2018 Jade Software Corporation Limited. All rights reserved. VERSION 2016 Copyright 2018 Jade Software Corporation Limited. All rights reserved. Jade Software Corporation Limited cannot accept any financial or other responsibilities that may be the result of your

More information