Linux Files and Directories. Linux directories Linux system are arranged in what is called a hierarchical directory structure. This means that they are.

Slides:



Advertisements
Similar presentations
Tony Kombol.  A program that  receives commands from a text input device (e.g. keyboard)  passes them to the operating system to perform  In the.
Advertisements

CS 497C – Introduction to UNIX Lecture 11: - The File System Chin-Chih Chang
The Unix File System. What are the three parts of every file on a Unix filesystem? And where is each stored? Filename - stored in directories Inode -
5 Basic utilities When a user logs in to the Linux operating system the directory that they will start in is their home directory. Most users will have.
Linux File & Folder permissions. File Permissions In Ubuntu, files and folders can be set up so that only specific users can view, modify, or run them.
UNIX file systems Learning Objectives: 1. To understand the basics of file systems 2. To understand the hierarchical structure in Unix file system 3. To.
Introduction to Unix (CA263) File System
Exploring the UNIX File System and File Security
The UNIX File System.
Guide To UNIX Using Linux Third Edition
UNIX Files and Security Software Tools. Slide 2 File Systems l What is a file system? A means of organizing information on the computer. A file system.
Basic UNIX © McGraw Hill All rights reserved.
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
File System and Directory Structure in Linux. What is File System In a computer, a file system is the way in which files are named and where they are.
COMP1070/2002/lec4/H.Melikian COMP1070 Lecture #5  Files and directories in UNIX  Various types of files  File attributes  Notion of pathname  Commands.
Guide To UNIX Using Linux Fourth Edition
EMT 2390L Lecture 2 Dr. Reyes. Outline What is the Shell Basic commands Linux Filesystem System commands.
1 Day 3 Directories Files Moving & Copying. 2 Case Sensitive First thing to learn about UNIX is that everything is case sensitive. Thus the files: –enda.
1 THE UNIX FILE SYSTEM By Chokechai Chuensukanant ID COSC 513 Operating System.
The file structure and related utilities CS240 Computer Science II.
Manage Directories and Files in Linux
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
Chapter 9 Part II Linux Command Line Access to Linux Authenticated login using a Linux account is required to access a Linux system. The Linux prompt will.
Linux Directory Navigation. File & Directory Commands This is a minimal list of Unix commands that you must know for file management: ls (list) mkdir.
Unix Basics Chapter 4.
Linux+ Guide to Linux Certification, Third Edition
Chapter Two Exploring the UNIX File System and File Security.
Week 3 Exploring Linux Filesystems. Objectives  Understand and navigate the Linux directory structure using relative and absolute pathnames  Describe.
Lesson 9-Setting and Using Permissions. Overview Describing file permissions. Using execute permissions with a file. Changing file permissions using mnemonics.
1 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Some content in this lecture added.
Operating Systems and Using Linux CMSC 104, Lecture 3 John Y. Park 1.
1 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
BIF713 Basic Unix/Linux Commands Getting Help with Commands.
Manage Directories and Files in Linux. 2 Objectives Understand the Filesystem Hierarchy Standard (FHS) Identify File Types in the Linux System Change.
Chapter Two Exploring the UNIX File System and File Security.
Chapter 1 : The Linux System Part 2 Lecture 2 11/14/
Unix Commands PowerPoint Presentation developed for LS 560 Information Technology online class - University of Alabama by Debey Sklenar TENacious Cohort.
E X C E E D I N G E X P E C T A T I O N S Basic LINUX Linux System Administration Dr. Hoganson Kennesaw State University Operating Systems Directory structure:
Linux+ Guide to Linux Certification, Third Edition
PacNOG 6: Nadi, Fiji UNIX ™/ /Linux Permissions Hervey Allen Network Startup Resource Center.
1 © 2001 John Urrutia. All rights reserved. Chapter 4 The LINUX Filesystem.
The Genome Analysis Centre Building Excellence in Genomics and Computational Bioscience.
File Systems, telnet and ftp Sources and Resources: 1. A Students Guide to UNIX, by Hahn 2. Paula Davidson’s Handout on UNIXHandout on UNIX.
The Unix File system (UFS) Presented by: Gurpreet Singh Assistant Professor Department of School of Computing and Engineering Galgotias University.
Agenda The Linux File System (chapter 4 in text)
BIF713 File and Directory Management. File System A File System is a structure used to organize programs and data on a computer ’ s storage device Files.
UNIX filesystem CS 2204 Class meeting 2 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
Linux+ Guide to Linux Certification, Second Edition Chapter 4 Exploring Linux Filesystems.
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
The Unix File System R Bigelow. The UNIX File System The file system refers to the way in which UNIX implements files and directories. The UNIX file system.
BIF703 File Permissions. As you recall from our previous notes, that Unix/Linux recognizes everything as a file: Regular files to store data, programs,
Linux Tutorial Lesson Two *Getting Help in Linux *Data movement and manipulation *Relative and Absolute path *Processes Note: see chapter 1,2,3 from Linux.
ORAFACT The Linux File System. ORAFACT Filesystem Support Support for dozens of filesystem types including: Minix, ext2, MS-DOS, UMSDOS, VFAT, NTFS, NFS,
Agenda The Linux File System (chapter 4 in text) Directory Structures / Navigation Terminology File Naming Rules Relative vs Absolute pathnames Unix Commands:
Linux Administration – Finding You Way on the Command Line The Linux File Directory or Tree.
BILKENT UNIVERSITY DEPARTMENT OF COMPUTER TECHNOLOGY AND INFORMATION SYSTEMS CTIS156 INFORMATION TECHNOLOGIES II FILES AND FILE SYSTEM STRUCTURE.
Privileges: who can control what
UBUNTU INSTALLATION
Linux/Unix - Download Ubuntu Linux :
BIF703 File Permissions.
Exploring the UNIX File System and File Security
The Linux Command Line Chapter 3
Introduction Paul Flynn
Operating Systems and Using Linux
Operating Systems and Using Linux
Operating Systems and Using Linux
Operating Systems and Using Linux
Chapter 4: The Linux Filesystem
January 26th, 2004 Class Meeting 2
The Linux Command Line Chapter 3
Presentation transcript:

Linux Files and Directories

Linux directories Linux system are arranged in what is called a hierarchical directory structure. This means that they are organized in a tree-like pattern of directories (called folders in other systems), which may contain files and other directories. The first directory in the file system is called the root directory.

Understanding Linux directories Ubuntu uses the Linux file system, which is based on a series of folders in the root directory. Each of these folders contains important system files that cannot be modified unless you are running as the root user or use sudo. This restriction exists for both security and safety reasons: computer viruses will not be able to change the core system files, and ordinary users should not be able to accidentally damage anything vital.

Linux directories Below are some of the most important directories. The root directory—denoted by /—contains all other directories and files. Here are the contents of some essential system directories: /bin & /sbin Many essential system applications (equivalent to C:\Windows) /etc System-wide configuration files /home Each user will have a subdirectory to store personal files (for example /home/your-username, equivalent to C:\Users or C:\Documents and Settings) /lib Library files, similar to.dll files on Windows

Linux directories /media Removable media (CD-ROMs & USB drives) will be mounted in this directory /root contains the root user’s files (not to be confused with the root directory) /usr Pronounced “user,” it contains most program files (not to be confused with each user’s home directory, equivalent to C:\Program Files) /var/log Contains log files written by many applications

Understanding Linux directories Think of the file system tree as a maze, and you are standing in it. At any given moment, you are located in a single directory. – Inside that directory, you can see its files and the pathway to its parent directory and the pathways to the subdirectories of the directory in which you are standing. The directory you are standing in is called the working directory. To find the name of the working directory, use the pwd command. – pwd /home/me When you first log on to a Linux system, the working directory is set to your home directory. This is where you put your files. – On most systems, your home directory will be called /home/your_user_name

Looking around using LS The ls command is used to list the contents of a directory. It is probably the most commonly used Linux command. It can be used in a number of different ways.

Closer look at LS command If you use the -l option with ls, i.e. (ls –l) you will get a file listing that contains a wealth of information about the files being listed.

Using command ls -l

Interpreting results of ls -l File Name: The name of the file or directory. Modification Time: The last time the file was modified. If the last modification occurred more than six months in the past, the date and year are displayed. Otherwise, the time of day is shown. Size: The size of the file in bytes. Group: The name of the group that has file permissions in addition to the file's owner. Owner: The name of the user who owns the file. File Permissions: A representation of the file's access permissions. The first character is the type of file. A "-" indicates a regular (ordinary) file. A "d" indicates a directory. The second set of three characters represent the read, write, and execution rights of the file's owner. The next three represent the rights of the file's group, and the final three represent the rights granted to everybody else.

Some ls options -a or --all Displays hidden files as well -i or --inode Displays the unique file number (inode number) -l or --format=long Displays extra information -o or --no-color Omits colour-coding the output -p or -F Marks file type by adding a special character -r or --reverse Reverses sort order -R or --recursive Recurses into subdirectories (DOS: DIR/S) -S or --sort=size Sorts files by size (longest first) -t or --sort=time Sorts file by modification time (newest first) -X or --sort=extension Sorts file by extension (“file type”)

Important facts about file names File names that begin with a period character are hidden. – This only means that ls will not list them unless you say ls -a. File names in Linux, like Unix, are case sensitive. The file names "File1" and "file1" refer to different files. Linux has no concept of a "file extension" like legacy operating systems. Though Linux supports long file names which may contain embedded spaces and punctuation characters, limit the punctuation characters to period, dash, and underscore. – Most importantly, do not embed spaces in file names. If you want to represent spaces between words in a file name, use underscore characters. You will thank yourself later.