Introduction to Linux:
Prev
Chapter 3. About files and the file system
Next
3.5. Summary
On UNIX, as on Linux, all entities are in some way or another presented to the system as files with the appropriate file properties. Use of (predefined) paths allows the users and the system admin to find, read and manipulate files.
We've made our first steps toward becoming an expert: we discussed the real and the fake structure of the file system, and we know about the Linux file security model, as well as several other security precautions that are taken on every system by default.
The shell is the most important tool for interaction with the system. We learned several shell commands in this chapter, which are listed in the table below.
Table 3-10. New commands
Command
Meaning
bash
GNU shell program.
cat file(s)
Send content of file(s) to standard output.
cd directory
Enter directory
. cd
is a bash
built-in command.
chgrp newgroup
file(s)
Change the group ownership of file(s)
to newgroup
chmod mode
file(s)
Change access permissions on file(s)
chown newowner
[:[newgroup
]
] file(s)
Change file owner and group ownership.
cp sourcefile
targetfile
Copy sourcefile
to targetfile
.
df file
Reports on used disk space on the partition containing file
.
echo string
Display a line of text
export
Part of bash
that announces variables and their values to the system.
file filename
Determine file type of filename
.
find path
expression
Find files in the file system hierarchy
grep PATTERN
file
Print lines in file
containing the search pattern.
head file
Send the first part of file
to standard output
id
Prints real and effective user name and groups.
info command
Read documentation about command
.
less file
View file
with a powerful viewer.
ln targetfile
linkname
Make a link with name linkname
to targetfile
.
locate searchstring
Print all accessible files matching the search pattern.
ls file(s)
Prints directory content.
man command
Format and display online (system) manual pages for command
.
mkdir newdir
Make a new empty directory.
mv oldfile
newfile
Rename or move oldfile
.
pwd
Print the present or current working directory.
quota
Show disk usage and limits.
rm file
Removes files and directories.
rmdir file
Removes directories.
tail file
Print the last part of
* License

