Difference between revisions of "Basic Commands"

From 6bit.ch wiki
Jump to navigation Jump to search
Line 1: Line 1:
= watch =
Execute a command ever X seconds (default 2).</br>
<code>watch -n X who</code> execute the who command every X seconds</br>
= ls =
= ls =
 
<code>-a</code> do not ignore entries starting with .</br>
-a, --all</br>
<code>-F</code> append a symbol to indicate type (* executable, / directory, @ symlink, = socket, | named pipe, > door)</br>
do not ignore entries starting with .
<code>-h</code> (with <code>-l</code> and <code>-s</code>) print sizes like 1K 234M 5G</br>
 
<code>-i</code> display inode number</br>
-h, --human-readable</br>
<code>-l</code> use a long listing format</br>
with -l and -s, print sizes like 1K 234M 2G etc
<code>-r</code> reverse order while sorting</br>
 
<code>-s</code> display size</br>
-l</br>
<code>-t</code> sort by time, newest first</br>
use a long listing format
 
-r, --reverse</br>
reverse order while sorting
 
-t</br>
sort by time, newest first
 
-i</br>
display inode number


= less & more =
= less & more =
<code>space / f</code> scroll forward one screen</br>
<code>enter</code> scroll forward one line</br>
<code>b</code> scroll backward one screen</br>
<code>d</code> scroll forward half a screen</br>
<code>h</code> display help</br>
<code>q</code> quit</br>
<code>/string</code> search string forward</br>
<code>?string</code> search string backward</br>
<code>n</code> find next occurrence</br>
<code>N</code> find previous occurrence (less only)</br>


space / f</br>
= setfacl =
scroll forward one screen</br>
<code>-b</code> remove all access acls</br>
<code>-d</code> apply default acl</br>
<code>-k</code> remove all default acls</br>
<code>-m</code> set or modify acls</br>
<code>-n</code> prevent automatic recalculation of mask</br>
<code>-R</code> apply recursive</br>
<code>-x</code> remove access acl</br>


enter</br>
= watch =
scroll forward one line</br>
Execute a command every X seconds (default 2).</br>
 
<code>watch -n X who</code> execute the who command every X seconds</br>
b</br>
scroll backward one screen</br>
 
d</br>
scroll forward half a screen</br>
 
h</br>
display help</br>
 
q</br>
quit</br>
 
/string</br>
search string forward</br>
 
?string</br>
search string backward</br>
 
n</br>
find next occurrence</br>
 
N</br>
find previous occurrence (less only)</br>


= wc =
= wc =
Display lines (<code>-l</code>), words (<code>-w</code>), bytes (<code>-c</code>) or characters (<code>-m</code>) of file.


display lines (-l), words (-w), bytes (-c), characters (-m) of file</br>
= whatis =
 
Display one-line man page description of a command.</br>
= setfacl =
 
-b</br>
remove all access acls
 
-d</br>
apply default acl
 
-k</br>
remove all default acls
 
-m</br>
set or modify acls
 
-n</br>
prevent automatic recalculation of mask


-R</br>
= whereis =
apply recursive
Locate the binary, source and man pages for a command.</br>


-x</br>
= which =
remove access acl
Locate a command.</br>

Revision as of 10:14, 30 December 2022

ls

-a do not ignore entries starting with .
-F append a symbol to indicate type (* executable, / directory, @ symlink, = socket, | named pipe, > door)
-h (with -l and -s) print sizes like 1K 234M 5G
-i display inode number
-l use a long listing format
-r reverse order while sorting
-s display size
-t sort by time, newest first

less & more

space / f scroll forward one screen
enter scroll forward one line
b scroll backward one screen
d scroll forward half a screen
h display help
q quit
/string search string forward
?string search string backward
n find next occurrence
N find previous occurrence (less only)

setfacl

-b remove all access acls
-d apply default acl
-k remove all default acls
-m set or modify acls
-n prevent automatic recalculation of mask
-R apply recursive
-x remove access acl

watch

Execute a command every X seconds (default 2).
watch -n X who execute the who command every X seconds

wc

Display lines (-l), words (-w), bytes (-c) or characters (-m) of file.

whatis

Display one-line man page description of a command.

whereis

Locate the binary, source and man pages for a command.

which

Locate a command.