LinuxBasics.org

The community that helps people to run Linux

rss

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 file.
umask [value] Show or change new file creation mode.
wc file Counts lines, words and characters in file.
which command Shows the full path to command.


We also stressed the fact that you should READ THE MAN PAGES. This documentation is your first-aid kit and contains the answers to many questions. The above list contains the basic commands that you will use on a daily basis, but they can do much more than the tasks we’ve discussed here. Reading the documentation will give you the control you need.

Last but not least, a handy overview of file permissions:

Table 3-11. File permissions

Who\What r(ead) w(rite) (e)x(ecute)
u(ser) 4 2 1
g(roup) 4 2 1
o(ther) 4 2 1


Prev: File security
Home
Next: Exercises


Copyright (c) by the authors.
This section of the wiki is licensed under the terms of the GNU Free Documentation License.
See the LBook-licensing page for details.


Linux® is a registered trademark of Linus Torvalds.


 
  course/book/sect_03_05.txt · Last modified: 2008/07/20 19:08

LinuxBasics.org

Start Linux-Course Tutorials Linux Links Security Blog Forum E-mail List Search Online Chat

Site-Info

Help Get in Touch Making of LBo

Wiki-Control

Powered by

Linux Apache DokuWiki Mailman RUTE ht://Dig