Você está na página 1de 3

mkdir [OPTION ...] DIRECTORY ...

cd [option] [directory] ping is a simple way Vi most popular text editor


If the specified DIRECTORY does not cd / -root directory to send network data vi [ -| -s ] [-l] [-L] [-R] [ -r [ filename ] ] [-S] [-t tag]
already exist, mkdir creates it. cd /usr/sbin takes you to to, and receive network [-v] [-V]
mkdir mydir that directory from data from, another [-x] [-w] [-n ] [-C] [+command | -c command ]
mkdir -m a=rwx mydir anywhere computer on a network filename
all user can read write and execute. Absolute path name -cd ping [- vi myfile.txt
m for file modes /usr/local/share/man/man2 LRUbdfnqrvVaAB] [-c pico is a simple text editor in the style of the
mkdir -p /home/chope/a/b/c Relative cd man2 count] [-m mark] [-i pine composer.
If parent directory doesnt exist, it cd.. parent directory interval] [-l preload] pico [ options ] [ file ]
will make it. -P option instructs cd to use the [-p pattern] [-s pico myfile.txt
rmdir [-p] directory physical directory structure instead packetsize] [-t ttl] [-w
of following symbolic links. The -L deadline] [-F flowlabel] head makes it easy to output the first part of
The rmdir utility removes the files.
directory entry specified by each option forces symbolic links to be [-I interface] [-M
followed. hint] [-N nioption] [-Q head [OPTION]... [FILE]...
directory argument, provided the by default, prints the first 10 lines of each FILE
directory is empty tos] [-S sndbuf]
[-T timestamp head myfile.txt
rmdir mydir ls [OPTION]... [FILE] first 10 lines
option] [-W timeout]
Lists the contents of a directory. head -15 myfile.txt
[hop ...] destination
a file descriptor (FD, less ls l long list
ping google.com 15 lines
frequently fildes) is an abstract ls / contents of root head -n 5K myfile.txt
ping google.com -c 1
indicator (handle) used to access a ls */ contents of all subdirectories 5000 lines
file or other input/output resource, ls ../ contents of parent directory head -c 6M myfile.txt
such as a pipe or network socket ls *.{htm,php,cgi} files contantining first 6megabytes
STDIN, 0; STDOUT, 1; STDERR, 2 these extensions
tail outputs the last part,
Redirect standard output > Redirect tail [OPTION]... [FILE]..
standard input < Append standard
output >>

ssh (the SSH client) is a program cat mytext.txt finger looks up and more
for logging into a remote machine Display text files displays information Displays text, one screen at a time.
and executing commands. It is Copy text files into a new document about system users more [-dlfpcsu] [-num lines] [+/pattern]
intended to replace rlogin Append the contents of a text file to finger [-lmsp] [user ...] [+linenum] [file ...]
the end of another text file, [user@host ...] more +3 myfile.txt
ssh [-1246AaCfgKkMNnqsTtVvXxYy] combining them finger -p ch contents from line3
[-b bind_address] [-c cipher_spec] cat mytext.txt mytext2.txt displays info about user more +/"hope" myfile.txt
[-D [bind_address:]port] [-e cat mytext.txt > newfile.txt ch contents from the beginning of string hope
escape_char] [-F configfile] to copy like cp command Displays who is logged less is a program similar to more, but it has many
[-I pkcs11] [-i identity_file] [-L cat mytext.txt mytext2.txt > on to the system. more features. less does not have to read the
[bind_address:]port:host:hostport] newfile.txt entire input file before starting, so with large
cat mytext.txt >> another-text-file.txt who [ OPTION ]... [
[-l login_name] [-m mac_spec] [-O FILE ] [ am i ] input files it starts up faster than text editors like
ctl_cmd] [-o option] [-p port] Append cat mytext.txt mytext2.txt vi
>> another-text-file.txt who
[-R who am i less [-
[bind_address:]port:host:hostport] cat Output the contents of a file. [+]aABcCdeEfFgGiIJKLmMnNqQrRsSuUVwWX~]
[-S ctl_path] [-W host:port] whoami prints the
tac (which is "cat" backwards) effective user ID. [-b space] [-h lines]
[-w local_tun[:remote_tun]] concatenates each FILE to standard [-j line] [-k keyfile] [-{oO} logfile] [-p pattern] [-
[user@]hostname [command] whoami [OPTION]
output just like the cat command, whoami P prompt]
but in reverse: line-by-line, printing [-t tag] [-T tagsfile] [-x tab,...] [-y lines] [-[z]
slogin shell.website.com the last line first. This is useful (for whois searches for lines]
instance) for examining a an object in a WHOIS [-# shift] [+[+]cmd] [--] [filename]
rlogin starts a terminal session on chronological log file in which the database. less file.txt
the remote host host. last line of the file contains the most whois [ -h HOST ] [ -p less -N file.txt
rlogin [-8EKLdx] [-e char] [-l recent information. PORT ] [ - views file beginning at line N
username] host tac [OPTION] ... [FILE] aCFHlLMmrRSVx ] [ -g
SOURCE:FIRST-LAST ]
wc prints newline, word, and byte counts for
rlogin -l hope domain.com tac file1.txt each FILE,
Login as user hope to the remote [ -i ATTR ] [ -S
SOURCE ] [ -T TYPE ] wc [OPTION]... [FILE]...
system domain.com wc myfile.txt
object
whois example.com sample output : 5 13 57 myfile.txt
lines/words/chars
tee duplicates its input, routing it to The rm command Using alias, frequently-used commands can be
A pipe is a form of redirection that multiple outputs at once. removes (deletes) files invoked using a different, preferred term
is used in Linux and other Unix-like tee [OPTION]... [FILE]... or directories. alias [name=['command']]
operating systems to send the ls -1 *.txt | wc -l | tee count.txt By default, it does not alias ll='ls -la'
output of one program to another man is the system's manual viewer; remove directories; ls comp*
program for further processing. Each argument given to man is If the -r (--recursive) Listing files using the ls command in a Linux
command_1 | command_2 [| normally the name of a program, option is specified, variant or Unix variant that begin with comp.
command_3 . . . ] utility or function. however, rm will rm c?mp
ls -al | less man man remove any matching Deleting files using the rm command in a Linux
View the manual page for the man directories and their or Unix variant that contain c, mp, and any
ln creates links between files. command. contents. character in-between.
ln creates hard links by default, rm [OPTION]... FILE... ls [sv]*
info reads documentation in the rm myfile.txt list files beginning with s or v
or symbolic links if the -s (-- info format
The command name chmod stands for
symbolic) option is specified. info [OPTION]... [MENU-ITEM...]
ln -s file1.txt file2.txt info emacs
mv renames file "change mode", and it is used to define the way
SOURCE to DEST, or a file can be accessed.
The whatis command provides moves the SOURCE file chmod options permissions filename
very brief descriptions of command (or files) to DIRECTORY. chmod u=rwx,g=rx,o=r myfile
line programs mv [OPTION]... [-T] chmod 754 myfile
whatis head SOURCE DEST Here the digits 7, 5, and 4 each individually
whatis head tail mv myfile.txt represent the permissions for the user, group,
ln file1.txt file2.txt
help destination-directory and others, in that order. Each digit is a
Display information about builtin The cp command is combination of the numbers 4, 2, 1, and 0:
commands. used to make copies of 4 stands for "read",
help [-dms] [PATTERN ...] files and directories. 2 stands for "write",
help echo cp [OPTION]... [-T] 1 stands for "execute", and
Each manual page has a short SOURCE DEST 0 stands for "no permission."
description included with it. apropos cp origfile newfile So 7 is the combination of permissions 4+2+1
The touch command updates the searches these descriptions for (read, write, and execute), 5 is 4+0+1 (read, no
access and modification times of The zip program is write, and execute), and 4 is 4+0+0 (read, no
instances of keyword.
each FILE to the current system apropos [-dalhvV] [-e|-w|-r] [-s list] used to package and write, and no execute).
time [-m system[,...]] [-M path] compress files.
touch [OPTION]... FILE... [-L locale] [-C file] keyword ... zip options archive
touch file.txt inpath inpath
apropos find zip stuff *

To compress The tar program is used to create, The passwd The chown command changes the owner and
gzip filename maintain, modify, and extract files command is used to owning group of files.
to decompress that are archived in the tar format change the password of chown [OPTION]... [OWNER][:[GROUP]] FILE...
gzip -d filename.gz tar [-] A --catenate --concatenate | c a user account chown chope file.txt
to compress and keep original file --create | d --diff --compare | passwd [OPTION] Set the owner of file file.txt to user chope.
gzip -k filename --delete | r --append | t --list | -- [USER] a new file's permissions may be restricted in a
uncompress thegzipped file test-label | u --update | passwd sally specific way by applying a permissions "mask"
gunzip backup.tar.gz x --extract --get [options] called the umask. The umask command is used
uz - gunzips and extracts a gzip'd [pathname ...] to set this mask, or to show you its current value.
tar'd archive tar -xf archive.tar umask [-S] [mask]
umask a+r umask a-x umask 777
find searches for files in a directory useradd is a low-level utility for SGID is defined as Sticky bits are mainly set on directories.
hierarchy. adding users to a system. giving temporary If the sticky bit is set for a directory, only the
find [-H] [-L] [-P] [-D debugopts] [- useradd [options] LOGIN permissions to a user to owner of that directory or the owner of a file can
Olevel] [path...] [expression] useradd -D run a program/file with delete or rename a file within that directory.
find . /home/jeff /home/stacy useradd newperson the permissions of the Encrypt a file with a password
find . -name 'apple' file group permissions Mcrypt is a replacement of crypt in old unix
The userdel command deletes a user to become member of mcrypt file1
account and all associated files. that group to execute decrypt the fiel
userdel [options] LOGIN the file mcrypt -d file1.nc
userdel -r username chmod g+s file1.txt mcrypt -d or mdecrypt
chmod 2750 file1.txt
Changes group ownership of a file or files. SUID can be set in two ways
chgrp [OPTION]... GROUP FILE... 1) Symbolic way (s, Stands for Set)
chgrp hope file.txt 2) Numerical/octal way (4)
Change the owning group of the file file.txt to the group named hope. chmod u+s file1.txt
chmod 4750 file1.txt

Você também pode gostar