htpasswd [options] passwordFile user
Flag | Usage |
---|---|
-b password | batch mode; i.e. get the password from the command line rather than prompting for it |
-B | use Bcrypt encryption for passwords. This is currently considered to be very secure. |
-C cost | with -B only : set the computing time (i.e. "cost") used by the bcrypt algorithm (higher is more secure but slower). Range of values for cost : 4 to 31. Defaults to 5. |
-c passwordFile | create passwordFile (or overwrites it if already exists)
Conflicts with -n
|
-D | Delete user from the specified passwordFile |
-i | Read the password from stdin without verification (i.e. entered only once). For script usage, see -b |
-m | use MD5 encryption for passwords. This is the default since version 2.2.18 |
-n | Display result to standard output rather than updating a file
Conflicts with -c
|
-p | use plaintext passwords |
New password: taptaptap
Re-type new password: taptaptap
bob:$apr1$Qn/z8Zl5$M7fw22yJmc5RUHUiq91Lo0
New password: taptaptap
Re-type new password: taptaptap
Adding password for user kevin
kevin:$apr1$fwPtbYsp$kT7VBUu8AXa9Pjqaj8dNt/
New password: taptaptap
Re-type new password: taptaptap
Adding password for user stuart
kevin:$apr1$fwPtbYsp$kT7VBUu8AXa9Pjqaj8dNt/ stuart:$apr1$Qj95O6iq$6pbjcgQYT2ou3TkPmlBVY0
New password: taptaptap
Re-type new password: taptaptap
Updating password for user stuart
kevin:$apr1$fwPtbYsp$kT7VBUu8AXa9Pjqaj8dNt/ stuart:$2y$05$rFegBEShO0WqXg9yeigKNuzygHZJPgAHo64GC3eF24Lv5/tIic3Ii
Warning: storing passwords as plain text might just not work on this platform.
New password: secret
Re-type new password: secret
Adding password for user bob
kevin:$apr1$fwPtbYsp$kT7VBUu8AXa9Pjqaj8dNt/ stuart:$2y$05$rFegBEShO0WqXg9yeigKNuzygHZJPgAHo64GC3eF24Lv5/tIic3Ii bob:secret
Warning: storing passwords as plain text might just not work on this platform. bob:mYsEcReTpA$$w0rD
bob:$apr1$B/Adf9iJ$KCt07Sss4wQWj8tt8z8AB0
$2y$05$y.tTu01k/XRf4x3GCVfOlujjeGr7kVLN.9bG5LYfOMvczYfZXefGq
Flag | Usage |
---|---|
-a | query all. Equivalent to -t any -v |
-C zoneName | Try to display the SOA records of zone zoneName |
-t type | select records having the specified type, which can be : CNAME, NS, SOA, SIG, KEY, AXFR, ... |
-v | verbose |
-w | wait for a reply forever (actually, the maximum number of seconds that can be written in an int ) |
-W timeoutSeconds | timeout after timeoutSeconds |
www.google.com has address 108.177.119.99 www.google.com has address 108.177.119.104 www.google.com has address 108.177.119.103 www.google.com has address 108.177.119.147 www.google.com has address 108.177.119.106 www.google.com has address 108.177.119.105 www.google.com has IPv6 address 2a00:1450:4013:c00::6a
8.8.8.8.in-addr.arpa domain name pointer google-public-dns-a.google.com.
google.com name server ns4.google.com. google.com name server ns3.google.com. google.com name server ns2.google.com. google.com name server ns1.google.com.
Using domain server: Name: ns4.google.com Address: 216.239.38.10#53 Aliases: www.google.com has address 216.58.208.228 www.google.com has IPv6 address 2a00:1450:4007:80e::2004
mail.google.com is an alias for googlemail.l.google.com.
Nameserver 216.239.32.10: google.com has SOA record ns3.google.com. dns-admin.google.com. 168998048 900 900 1800 60 Nameserver 216.239.38.10: google.com has SOA record ns1.google.com. dns-admin.google.com. 168998048 900 900 1800 60 Nameserver 216.239.34.10: google.com has SOA record ns3.google.com. dns-admin.google.com. 168998048 900 900 1800 60 Nameserver 216.239.36.10: google.com has SOA record ns1.google.com. dns-admin.google.com. 168998048 900 900 1800 60
Trying "google.com" ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13433 ;; flags: qr rd ra; QUERY: 1, ANSWER: 11, AUTHORITY: 4, ADDITIONAL: 4 ;; QUESTION SECTION: ;google.com. IN ANY ;; ANSWER SECTION: google.com. 157 IN MX 50 alt4.aspmx.l.google.com.
Flag | Usage |
---|---|
-a --adjust | add or subtract time from the hardware clock to account for systematic drift since the last time the clock was set or adjusted |
-r --show | read the Hardware Clock and print the time on Standard Output. The time shown is always in local time |
-w --systohc | write the current System Time into the Hardware Clock |
key | usage | more information |
---|---|---|
F1 or h | show help screen | |
F3 or / | incrementally search the command lines of all the displayed processes. While in search mode :
|
|
F | follow the highlighted process
|
man -P 'less -p "Follow\" process" ' htop |
H | toggle visibility of user process threads | |
K | toggle visibility of kernel threads |
CPU | Memory | |
---|---|---|
blue | Low priority threads | Buffers |
green | Normal priority threads | Used memory |
red | Kernel threads | |
yellow | Cache |
Flag | Usage |
---|---|
-c n --bytes=n | Print the first n bytes of myFile. If n has a leading -, print all except the last n bytes of myFile. |
-n n --lines=n | Print the first n lines of myFile. If n has a leading -, print all except the last n lines of myFile. |
head -n numberOfLines myFile can be shortened into head -numberOfLines myFile. Let's test this :
This is line #1 This is line #2
This is line #1 This is line #2
This is line #1 This is line #2 This is line #3There is no short version for this one.
For inline help on this command :
in-memory list made of :
history file
+ list of commands typed in the current Bash session (not yet written to the history file)
OR :
list of commands of the current Bash session that are not yet written to $HISTFILE
Flag | Usage |
---|---|
(none)
history
history n
|
Display the full / n latest entries of the history list (or history list + history file) with line numbers |
-a | append history lines from this session (history list) to the history file |
-c | clear the history list |
-d n | delete the history entry at line n
|
HISTTIMEFORMAT="%F %T "
Flag | Usage | Example |
---|---|---|
%F | Date in ISO 8601 format, equivalent to %Y-%m-%d | 2015-06-03 |
%T | Time in 24-hour notation, equivalent to %H:%M:%S | 16:34:51 |
ls -l /root ls: cannot open directory '/root': Permission denied sudo !! sudo ls -l /root [sudo] password for stuart: taptaptap ... [contents of /root] ...
Flag | Usage |
---|---|
-n length | Return only length bytes of input |
-s offset | Skip offset bytes from the beginning of the input |
Flag | Usage |
---|---|
-I (capital "i") | Request Identification info directly from the drive. |
-i | Display the device information retrieved by the kernel at boot time. This information may have been altered since then. |
-M | Get/set Automatic Acoustic Management (AAM) setting. This is not supported anymore by Seagate and Western Digital drives. |
-r | Get/set read-only flag for the device. When set, Linux disallows write operations on the device.
This command takes place at the hardware level, it instructs the hard drive itself to refuse write operations (not supported by all drives). Due to data buffering, after performing a write operation, the kernel will assume data has been written, whereas it is not, which may lead to data loss. (not been able to make this work so far ...) Details : 1, 2
|
-T | Perform timings of cache reads for benchmark and comparison purposes.
This displays the speed of reading directly from the Linux buffer cache without disk access. This measurement is essentially an indication of the throughput of the processor, cache, and memory of the system under test.
For meaningful results, this test should be executed on an inactive system (no other process) and repeated several times.
|
-t | Perform timings of device reads for benchmark and comparison purposes. This displays the speed of reading through the buffer cache to the disk without any prior caching of data (the buffer cache is flushed prior to measuring). This measurement is an indication of how fast the drive can sustain sequential data reads under Linux, without any filesystem overhead. For meaningful results, this test should be executed on an inactive system (no other process) and repeated several times.
|
hdparm -I /dev/sda
This is a capitali
.