Listing posts

Displaying posts 246 - 250 of 328 in total
Test if disk is SSD or HDD
mouse 1695 · person cloud · link
Last update
2018-02-17
2018
02-17
« — »

Test the value for rotational disk (1 = HDD, 0 = SSD):

1
2
3
4
5
6
cat /sys/block/sdX/queue/rotational

# or

apt install util-linux
lsblk -d -o name,rota # 1=HDD, 0=SSD

Source: Stackexchange


~~~ * ~~~

grep | less with colors
mouse 1176 · person cloud · link
Last update
2018-02-13
2018
02-13
« — »
1
grep --color=always -rin term . | less -R

~~~ * ~~~

Dump, manipulate and restore an .RRD database
mouse 1563 · person cloud · link
Last update
2018-02-03
2018
02-03
«rrdtool dump and restore»
1
2
3
4
5
6
7
# single file
rrdtool dump    infile.rrd outfile.xml
rrdtool restore infile.xml outfile.rrd

# massive
for i in *.rrd; do rrdtool dump    $i ${i%.rrd}.xml; done
for i in *.xml; do rrdtool restore $i ${i%.xml}.rrd; done

Source: hashbangcode


~~~ * ~~~

Eta' del gatto in anni umani
mouse 1260 · person cloud · link
Last update
2018-01-22
2018
01-22
« — »
Cover original
Gatto Uomo
2 mesi 3
4 mesi 6
6 mesi 9
8 mesi 11
10 mesi 13
1 15
1.5 20
2 24
3 28
4 32
5 36
6 40
7 44
8 48
9 52
10 56
11 60
12 64
13 68
14 72
15 76
16 80
17 84
18 88
19 92
20 96
21 100

~~~ * ~~~

Resume scp transfer
mouse 1596 · person cloud · link
Last update
2018-01-19
2018
01-19
« — »

Short options:

1
2
3
rsync -v -s -P -e ssh \
  username@remote_host:/path/to/remote_file.ext \
  local_file.ext

or use the extended options:

1
2
3
4
5
6
rsync --verbose \
  --protect-args \
  --partial --progress \
  --rsh=ssh \
  username@remote_host:/path/to/remote_file.ext \
  local_file.ext

Source: Stack overflow 1 and 2.