Changes

Jump to: navigation, search

Tutorial2: Unix / Linux File Management

42 bytes removed, 09:40, 15 May 2023
KEY CONCEPTS
To better '''organize''' files (eg. text, images, documents, spreadsheets, programs) within your Matrix account, they should be stored in '''directories'''. To further organize <u>many</u> files, directories<br> may contain '''sub-directories'''.
The Unix/Linux file system is '''hierarchical''', like other operating systems such as '''Windows''', '''Mac OSXmacOS''', etc.In Unix / Linux (as opposed to MS Windows), there are no drive letters (such as '''C:''', or '''D:''').<br> All files and directories appear under a single ancestor directory called the "'''root directory'''".
Learning how to issue Linux commands for '''navigating''' and '''manipulating''' directory and files within the the Linux filesystem are '''essential skills''' for Linux users and Linux system administrators (i.e. ''sysadmins'').
In the Linux (Unix) OS, the "'''root directory'''" / is the starting directory, and other "''child directories''", "'''grandchild directories'''", etc. can be created as required. The hierarchical structure resembles an "''upside-down tree''".  There is actually a command called '''<code>tree''' </code> that displays a "'''directory tree diagram'''"!<br><br>
=== Directory Pathnames ===
[[Image:path-name.png|thumb|right|180px|A pathname points to a file system location by '''following the directory tree hierarchy'''.]]
<i>''A '''pathname''' is used to specify a '''route to a file''' within the file system.<br><br>A pathname '''points''' to a file system location by '''following the directory tree hierarchy''' expressed in a string of characters in which path components, separated by a delimiting character, represent each directory. The '''delimiting character''' is most commonly the slash ("'''/'''").</i> Reference: https://en.wikipedia.org/wiki/Path_(computing)
A pathname '''points''' to a file system location by '''following the directory tree hierarchy''' expressed in a string of characters in which path components, separated by a delimiting character, represent each directory. The following table displays and defines '''delimiting character''' is most commonly used directoriesthe slash ("'''/'''<br>").'' Reference: https://en.wikipedia.org/wiki/Path_(listed by directory pathnamecomputing) for for ALL Unix / Linux Filesystems:<br>
<br><br>The following table displays and defines '''commonly used directories''' (listed by directory pathname) for for ALL Unix / Linux Filesystems:
[[Image:directory-structure-2.png|thumb|right|500px|'''Common directory pathnames'''<br>for for ALL Unix / Linux Filesystems.]]<table cellpadding="5"><tr><th style="border-bottom: 1px solid black;">Directory Pathname</th><th style="border-bottom: 1px solid black;">Purpose</th></tr><tr><td>'''/'''</td><td>Root directory (ancestor to all directories)</td></tr><tr><td>'''/home'''</td><td>Used to store users’ home directories
</td></tr><tr><td>'''/home/username'''</td><td>A '''<u>specific</u>''' User's Home Directory</td></tr><tr><td>'''/bin'''</td><td>Common system binaries (commands) </td></tr><tr><td>'''/usr/bin'''</td><td>Common utilities (commands) for users. </td></tr><tr><td>'''/usr/sbin'''</td><td>Common utilities for system administration </td></tr><tr><td>'''/etc'''</td><td>System administration files (eg. passwd)</td></tr><tr><td>'''/var'''</td><td>Dynamic files (log and mail files)</td></tr><tr><td>'''/tmp , /var/tmp'''</td><td>Temporary files for programs</td></tr><tr><td>'''/dev'''</td><td>Device driver files (terminals, printers, etc.)
</td></tr></table><br> 
When you log into your Matrix account, you are automatically directed to your '''home''' directory.<br>This directory is where the user can store files, and create subdirectories to organize their files.
=INVESTIGATION 1: CREATING &amp; MANAGING DIRECTORIES=

Navigation menu