Linux File Permissions
Linux File Permissions
Linux File Permissions
home - Contains the user's home directories along with directories for services
bin - Commands needed during boot up that might be needed by normal users
sbin - Like bin but commands are not intended for normal users. Commands run
by LINUX.
proc - This file system is not on a disk. It is a virtual file system that exists in
the kernels imagination which is memory.
1 - A directory with info about process number 1. Each process has a directory
below proc.
usr - Contains all commands, libraries, man pages, games and static files for
normal operation.
bin - Almost all user commands. some commands are in /bin or /usr/local/bin.
sbin - System admin commands not needed on the root file system. e.g., most
server programs.
boot - Files used by the bootstrap loader, LILO. Kernel images are often kept
here.
lib - Shared libraries needed by the programs on the root file system
modules - Loadable kernel modules, especially those needed to boot the system
after disasters.
cd : Change the current directory. With no arguments "cd" changes to the users
home directory.
dd :Convert and copy a file formatting according to the options. Disk or data
duplication.
file :Determines file type. Also can tell type of library (a.out or ELF).
find
Ex: find $Home –name readme Print search for readme starting at home and
output full path.
Ls: List files. Option -a, lists all, see man page "man ls"
Ex: "ls Docum Projects/Linux" - The contents of the directories Docum
and Projects/Linux are listed.
To list the contents of every subdirectory using the ls command:
1. Change to your home directory.
2. Type: ls -R
pwd : Print or list the working directory with full path (present working
directory).
rm : Ex: "rm .*" - Effect: Delete system files (Remove files) –i is interactive
option.
slocate
Provides a secure way to index files and search for them. It builds a database of
files on the system.
vi Editor with a command mode and text mode. Starts in command mode.
VI Editor
List of Commands for vi - An Unix/Linux
Editor
Complete Documentation
The vi editor is a common editor for unix systems in that it makes use of a regular keyboard
with an escape key. On the DECstation, the escape key is the F11 key. It therefore works on
all unix computers. Complete documentation is available by typing
man vi
Undo Command
u
undo the last command.
Screen Commands
CTL/l
Reprints current screen.
CTL/L
Exposes one more line at top of screen.
CTL/E
Exposes one more line at bottom of screen.
CTL/F
Pages forward one screen.
CTL/B
Pages back one screen.
CTL/D
Pages down half screen.
CTL/U
Pages up half screen.
Changing Commands
cw
Changes characters of current word until stopped with escape key.
c$
Changes text up to the end of the line.
C, cc
Changes remaining text on current line until stopped by pressing the escape key.
~
Changes case of current character.
xp
Transposes current and following characters.
J
Joins current line with next line.
s
Deletes the current character and goes into the insertion mode.
rx
Replaces current character with x.
R
Replaces the following characters until terminated with the escape key.
Exiting vi
ZZ
Exits vi and saves changes.
:wq
Writes changes to current file and quits edit session.
:q!
Quits edit session (no changes made).
!q
Force Quit.