Browsing the Filesystem. Linux File Hierarchy Concepts Files and directories are organized into a single- rooted inverted tree structure Filesystem begins.

Презентация:



Advertisements
Похожие презентации
Unit 2 Users Management. Users Every user is assigned a unique User ID number (UID) UID 0 identifies root User accounts normally start at UID 500 Users'
Advertisements

Week Finding and Processing files 2 locate Queries a pre-built database of paths to files on the system Database must be updated by administrator.
Using Bash Shell. Command Line Shortcuts File Globbing Globbing is wildcard expansion: * - matches zero or more characters ? - matches any single character.
© 2005 Cisco Systems, Inc. All rights reserved.INTRO v Managing Your Network Environment Managing Cisco Devices.
PAT312, Section 21, December 2006 S21-1 Copyright 2007 MSC.Software Corporation SECTION 21 GROUPS.
USB Download Manual (v1.3) (GP2 Year 2010) LG Electronics/ LCD TV Division Feb. 17 th, Applied Models & Notice - File Copy - User Download Mode.
© 2006 Avaya Inc. All rights reserved. Embedded File Management and SD-Card Handling.
SPLAY TREE The basic idea of the splay tree is that every time a node is accessed, it is pushed to the root by a series of tree rotations. This series.
Linux Daemons. Agenda What is a daemon What is a daemon What Is It Going To Do? What Is It Going To Do? How much interaction How much interaction Basic.
Using Dreamweaver MX Slide 1 Window menu Manage Sites… Window menu Manage Sites… 2 2 Open Dreamweaver 1 1 Set up a website folder (1). Click New…
Copyright CCNA 2 Chapter 12 Configuring a Router By Your Name.
© 2006 Cisco Systems, Inc. All rights reserved. BSCI v Configuring OSPF OSPF Route Summarization.
Carousel from flshow.netflshow.net by Saverio CaminitiSaverio Caminiti.
Colour Pencils Your Name. Process Flow Bullet 1 Bullet 2 Bullet 3 Bullet 1 Bullet 2 Bullet 3 Bullet 1 Bullet 2 Bullet 3 Bullet 1 Bullet 2 Bullet 3 Bullet.
Mobility Control and one-X Mobile. Mobility Control User Configuration Mobile Call Control requires PRI-U, BRI or SIP (RFC2833) trunks in the IP Office.
Unit 3 Text Processing and System Configuration tools.
© 2005 Cisco Systems, Inc. All rights reserved. BGP v Customer-to-Provider Connectivity with BGP Connecting a Multihomed Customer to Multiple Service.
S15-1 PAT318, Section 15, March 2005 SECTION 15 MSC.PATRAN FILES.
Week Configuring the Bash Shell 2 Environment Variables Bash variables are local to a single shell by default Set with VARIABLE= VALUE Environment.
Running Commands & Getting Help. Running Commands Commands have the following syntax: command options arguments Each item is separated by a space Options.
Транксрипт:

Browsing the Filesystem

Linux File Hierarchy Concepts Files and directories are organized into a single- rooted inverted tree structure Filesystem begins at the root directory, represented by a lone / (forward slash) character. Names are case-sensitive Paths are delimited by /

Some Important Directories Home Directories: /root,/home/username User Executables: /bin, /usr/bin, /usr/local/bin System Executables: /sbin, /usr/sbin, /usr/local/sbin Other Mountpoints: /media, /mnt Configuration: /etc Temporary Files: /tmp Kernels and Bootloader: /boot Server Data: /var, /srv System Information: /proc, /sys Shared Libraries: /lib, /usr/lib, /usr/local/lib

Current Working Directory Each shell and system process has a current working directory(cwd) pwd Displays the absolute path to the shell's cwd File and Directory Names Names may be up to 255 characters All characters are valid, except the forward-slash It may be unwise to use certain special characters in file or directory names Some characters should be protected with quotes when referencing them Names are case-sensitive Example: MAIL, Mail, mail, and mAiL Again, possible, but may not be wise

Absolute and Relative Pathnames Absolute pathnames Begin with a forward slash Complete "road map" to file location Can be used anytime you wish to specify a file name Relative pathnames Do not begin with a slash Specify location relative to your current working directory Can be used as a shorter way to specify a file name

Changing Directories cd changes directories To an absolute or relative path: cd /home/joshua/work cd project/docs To a directory one level up: cd.. To your home directory: cd To your previous working directory: cd -

Listing Directory Contents Lists the contents of the current directory or a specified directory Usage: ls [options] [files_or_dirs] Example: ls -a (include hidden files) ls -l (display extra information) ls -R (recurse through directories) ls -ld (directory and symlink information)

Copying Files and Directories cp - copy files and directories Usage: cp [options] file destination More than one file may be copied at a time if the destination is a directory: cp [options] file1 file2 dest

If the destination is a directory, the copy is placed there If the destination is a file, the copy overwrites the destination If the destination does not exist, the copy is renamed Moving and Renaming Files and Directories mv - move and/or rename files and directories Usage: mv [options] file destination More than one file may be moved at a time if the destination is a directory: mv [options] file1 file2 destination Destination works like cp Copying Files and Directories The Destination

touch - create empty files or update file timestamps rm - remove files Usage: rm [options]... Example: rm -i file (interactive) rm -r directory (recursive) rm -f file (force) mkdir creates directories rmdir removes empty directories rm -r recursively removes directory trees Creating and Removing Files & Directories

Gnome graphical filesystem browser Can run in spatial or browser mode Accessed via... Desktop icons Home: Your home directory Computer: Root filesystem, network resources and removable media Applications->System Tools->File Browser Moving and Copying in Nautilus Drag-and-Drop Drag: Move on same filesystem, copy on different filesystem Drag + Ctrl: Always copy Drag + Alt: Ask whether to copy, move or create symbolic link (alias) Context menu Right-click to rename, cut, copy or paste Using Nautilus

Files can contain many types of data Check file type with file before opening to determine appropriate command or application to use file [options]... Determining File Content