-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathlinux-filesystem.html
More file actions
201 lines (176 loc) · 8.59 KB
/
linux-filesystem.html
File metadata and controls
201 lines (176 loc) · 8.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Linux filesystem">
<meta name="author" content="LinuxForLife.com">
<title>Linux filesystem</title>
<link rel="icon" href="img/favicon.ico">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/custom.css">
</head>
<body>
<div class="navbar navbar-inverse navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">LinuxForLife.com</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div><!--navbar -->
<div class="row">
<div class="col-sm-2">
<div class="list-group">
<div class="list-group">
<a class="list-group-item " href="what-is-an-perating-system.html"><span class="fa fa-square"></span> What is an Operating System?</a>
<a class="list-group-item " href="unix-history.html"><span class="fa fa-square"></span> UNIX History</a>
<a class="list-group-item " href="what-is-linux.html"><span class="fa fa-square"></span> What is Linux?</a>
<a class="list-group-item active" href="linux-filesystem.html"><span class="fa fa-square"></span> Linux filesystem</a>
<a class="list-group-item" href="gnu-linux-filesystem-structure.html"><span class="fa fa-square"></span> GNU / Linux filesystem structure</a>
<a class="list-group-item" href="shells-and-file-handling.html"><span class="fa fa-square"></span> Command line interpreters</a>
</div>
</div>
</div>
<!-- /.col-sm-3 -->
<div class="col-sm-8">
<!-- Example row of columns -->
<div class="row">
<div class="page-header">
<h1>Linux filesystem</h1>
</div>
<p>Almost everything in Unix is a file!</p>
<ul>
<li>Regular files</li>
<li>Directories - Directories are just files listing a set of files</li>
<li>Symbolic links - Files referring to the name of another file</li>
<li>Devices and peripherals - Read and write from devices as with regular files</li>
<li>
Pipes - Used to cascade programs. <pre>
cat *.log | grep error</pre>
</li>
<li>Sockets - Inter process communication</li>
</ul>
<p> </p>
<h1>File names</h1>
<p>File name features since the beginning of Unix</p>
<ul>
<li>File names in linux are Case sensitive</li>
<li>File names in linux has No obvious length limit</li>
<li>File names in linux can contain any character (including whitespace, except /). File types stored in the file (“magic numbers”). File name extensions not needed and not interpreted. Just used for user convenience.</li>
<li>
File name examples:
<pre>
README .bashrc Windows Buglist
index.htm index.html index.html.old
</pre>
</li>
</ul>
<p> </p>
<h1>File paths</h1>
<p>A path is a sequence of nested directories with a file or directory at the end, separated by the / character</p>
<ul>
<li>
Relative path:
<pre>
$ documents/files/my_filwe.txt
</pre>
Relative to the current directory
</li>
<li>
Absolute path:
<pre>
$ /home/pc_name/dir/file_abc.txt
</pre>
</li>
<li>
root directory.
<pre>
$ /
</pre>
Start of absolute paths for all files on the system (even for files on removable devices or network shared).
</li>
</ul>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p> </p>
<hr>
</div>
</div>
</div>
<!-- Fixed footer -->
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-73773451-2', 'auto');
ga('send', 'pageview');
</script>
<div class="navbar navbar-inverse navbar-static-bottom" role="navigation">
<div class="container">
<div class="col-md-4">
<p><font color="white">© 2016-2018 LinuxForLife.com</font></p>
<a href="https://www.facebook.com/Programmingknowledge"><i class="fa fa-facebook-square fa-2x"></i></a>
<a href="https://twitter.com/ProgrammingKnow"><i class="fa fa-twitter fa-2x"></i></a>
<a href="https://plus.google.com/+Programmingknowledge"><i class="fa fa-google-plus fa-2x"></i></a>
<a href="https://www.youtube.com/ProgrammingKnowledge"><i class="fa fa-youtube-square fa-2x"></i></a>
<ul>
<li><a href="about.html">About</a></li>
<li><a href="disclaimer.html">Disclaimer</a></li>
<li><a href="sitemap.html">Sitemap</a></li>
<li><a href="http://www.codebind.com">CodeBind.com</a></li>
<li><a href="http://www.videotogifs.com/">VideoToGifs.com</a></li>
<li><a href="http://easyonlineconverter.com/">EasyOnlineConverter.com</a></li>
<li><a href="http://sqlitetutorials.com/sqlite-intro.html">SqliteTutorials.com</a></li>
<script src="https://apis.google.com/js/platform.js"></script>
<div class="g-ytsubscribe" data-channel="ProgrammingKnowledge" data-layout="full" data-count="default"></div>
</ul>
</div>
<div class="col-md-4">
<iframe class="domain-widget-codebind" src="//www.bluehost.com/web-hosting/domaincheckapi/?affiliate=codebind" width="100%"
height="250"></iframe>
</div>
<div class="col-md-4">
<a href="//www.bluehost.com/track/codebind/" target="_blank"> <img border="0" src="//bluehost-cdn.com/media/partner/images/codebind/300x250/300x250BW.png"> </a>
</div>
</div>
</div>
<div id="fb-root"></div>
<script>
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.10";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>