Download Supporting Essentials - Linux - Lecture Slides and more Slides Linux skills in PDF only on Docsity!
Linux Basics
Introduction
Command Line The standard utilities for manipulating filesFeatures providing by shell
File systemInstallation
Command line
rm (ReMove) - -r, orI Request confirmation before each deletion – R Delete recursively
Example rm – i images/*.jpg file1^ ^ - f The opposite of- Deletes all files which name^ – I
rm –^ ends with .jpg in the current directory Rf images/misc/file* - Deletes without requesting
confirmation the whole directory misc/ in directory images/ together with files in the currrent directory
Command line
mv (Move) - -f Force file movingi The opposite
Example^ ^ - v Verbose
Mv /tmp/pics/ which name ends with .gif to the current directory – I/tmp/pics/*.gif - Move al files in directory
mv foo bar - Rename file foo as bar
Command line
Handling File Attributes chown, chgrp (change the owner and group of one or more files
- subdirectories in a given directory-R Recursive; to change the owner of all files andv Verbose mode, describes all actions performed by chown - c Like – v, but only reports which files have been changed
Command line
Example chmod removes write permission for “other” on – R o-w/shared/docs – Recursively
all files and subdirectories of /shared/docs
chmod removes write permission for the group and others for whole directory private/, – R og-w,o-x private – Recursively
and removes the execution permission for others.
Command line
Example image/cars,space[0 filenames ending with .jpg in directory - 9]/*.jpg – All
image/cars, image/space0, … , image/space9, if such directories exist
*[!a with a lowercase letter in the current directory - z] – All files which names do not end
Command line
Example Redirections
$ Is image/*.gif 1>file_list redirected (>) to the file named – file_list command (1) is
Example Pipes
Is images/*.gif | wc the of the Is command is redirected to the standard input wc command – 1 – The standard output of
File System
Links The directory itself (.)Parent directory (..)
Anonymous Pipes The shell creates the pipe and operates before the pipe write
Name pipes to itOpposite to the pipes used by shell
File System
Special files Character mode Files were buffered
Symbolic links^ ^ Block mode files^ ^ Files were not buffered
Files of a particular type whose sole contents is an arbitrary string
Installation
Requirements A computer with a working operating systemGeneral knowledge of the operating system you use
Some space on your hard diskA compiler (usually for the C language) and an archiver (tar)
Installation
Compilation Principle Translate a source code into a binary file
Logically done by a C compilerRepetitive operations are handled by a utility name make
Installation
Structure of a distribution AnA readme install file, which contains general information related tofile, which describes the installation procedure
the programA distribution conditions of the software copying file, which contains the license or describes the A related to the software contrib or credits file, which contains a list of people
Installation
A bugfixesA changesmakefile file, which contains recent improvements and file, which allows compilation of the software A newA directory that contains the sources ( configure Makefile or Imakefile file, which allow one to generate a src ) A directory that contains the document ( doc )