- Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathlinux-filesystem.html
More file actions
Latest commit
201 lines (176 loc) · 8.59 KB
/
Copy pathlinux-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>
<htmllang="en">
<head>
<metacharset="utf-8">
<metahttp-equiv="X-UA-Compatible" content="IE=edge">
<metaname="viewport" content="width=device-width, initial-scale=1">
<metaname="description" content="Linux filesystem">
<metaname="author" content="LinuxForLife.com">
<title>Linux filesystem</title>
<linkrel="icon" href="img/favicon.ico">
<linkhref="css/bootstrap.min.css" rel="stylesheet">
<linkhref="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<linkrel="stylesheet" type="text/css" href="css/custom.css">
</head>
<body>
<divclass="navbar navbar-inverse navbar-static-top" role="navigation">
<divclass="container">
<divclass="navbar-header">
<buttontype="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<spanclass="sr-only">Toggle navigation</span>
<spanclass="icon-bar"></span>
<spanclass="icon-bar"></span>
<spanclass="icon-bar"></span>
</button>
<aclass="navbar-brand" href="index.html">LinuxForLife.com</a>
</div>
<divclass="navbar-collapse collapse">
<ulclass="nav navbar-nav">
<li><ahref="index.html">Home</a></li>
<li><ahref="about.html">About</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div><!--navbar -->
<divclass="row">
<divclass="col-sm-2">
<divclass="list-group">
<divclass="list-group">
<aclass="list-group-item " href="what-is-an-perating-system.html"><spanclass="fa fa-square"></span> What is an Operating System?</a>
<aclass="list-group-item " href="unix-history.html"><spanclass="fa fa-square"></span> UNIX History</a>
<aclass="list-group-item " href="what-is-linux.html"><spanclass="fa fa-square"></span> What is Linux?</a>
<aclass="list-group-item active" href="linux-filesystem.html"><spanclass="fa fa-square"></span> Linux filesystem</a>
<aclass="list-group-item" href="gnu-linux-filesystem-structure.html"><spanclass="fa fa-square"></span> GNU / Linux filesystem structure</a>
<aclass="list-group-item" href="shells-and-file-handling.html"><spanclass="fa fa-square"></span> Command line interpreters</a>
</div>
</div>
</div>
<!-- /.col-sm-3 -->
<divclass="col-sm-8">
<!-- Example row of columns -->
<divclass="row">
<divclass="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*newDate();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>
<divclass="navbar navbar-inverse navbar-static-bottom" role="navigation">
<divclass="container">
<divclass="col-md-4">
<p><fontcolor="white">© 2016-2018 LinuxForLife.com</font></p>
<ahref="https://www.facebook.com/Programmingknowledge"><iclass="fa fa-facebook-square fa-2x"></i></a>
<ahref="https://twitter.com/ProgrammingKnow"><iclass="fa fa-twitter fa-2x"></i></a>
<ahref="https://plus.google.com/+Programmingknowledge"><iclass="fa fa-google-plus fa-2x"></i></a>
<ahref="https://www.youtube.com/ProgrammingKnowledge"><iclass="fa fa-youtube-square fa-2x"></i></a>
<ul>
<li><ahref="about.html">About</a></li>
<li><ahref="disclaimer.html">Disclaimer</a></li>
<li><ahref="sitemap.html">Sitemap</a></li>
<li><ahref="http://www.codebind.com">CodeBind.com</a></li>
<li><ahref="http://www.videotogifs.com/">VideoToGifs.com</a></li>
<li><ahref="http://easyonlineconverter.com/">EasyOnlineConverter.com</a></li>
<li><ahref="http://sqlitetutorials.com/sqlite-intro.html">SqliteTutorials.com</a></li>
<scriptsrc="https://apis.google.com/js/platform.js"></script>
<divclass="g-ytsubscribe" data-channel="ProgrammingKnowledge" data-layout="full" data-count="default"></div>
</ul>
</div>
<divclass="col-md-4">
<iframeclass="domain-widget-codebind" src="//www.bluehost.com/web-hosting/domaincheckapi/?affiliate=codebind" width="100%"
height="250"></iframe>
</div>
<divclass="col-md-4">
<ahref="//www.bluehost.com/track/codebind/" target="_blank"><imgborder="0" src="//bluehost-cdn.com/media/partner/images/codebind/300x250/300x250BW.png"></a>
</div>
</div>
</div>
<divid="fb-root"></div>
<script>
(function(d,s,id){
varjs,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 -->
<scriptsrc="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<scriptsrc="js/bootstrap.min.js"></script>
</body>
</html>