|
1062 | 1062 | # last tty (tty switching is also possible by ~M-'some-f-key'>~) |
1063 | 1063 |
|
1064 | 1064 | # mount windows shares under linux |
| 1065 | + # -o, --options <list> comma-separated list of mount options |
1065 | 1066 | sudo mount.cifs //WINDOWS_MACHINE/path/to/dir path/to/dir \ |
1066 | | - -o user=WINDOWS_USERNAME |
| 1067 | + --options user=WINDOWS_USERNAME |
1067 | 1068 |
|
1068 | 1069 | # resize disk of a virtual machine |
1069 | 1070 | set file /path/to/some-name.iso.qcow2 |
|
1095 | 1096 | df -h |
1096 | 1097 |
|
1097 | 1098 | # :virtualbox mount shared folder |
1098 | | - sudo mount -t vboxsf share /home/username/share/ |
| 1099 | + # -t, --types <list> limit the set of filesystem types |
| 1100 | + sudo mount --types vboxsf share /home/username/share/ |
1099 | 1101 |
|
1100 | 1102 | # readonly to readwrite |
1101 | | - sudo mount -o remount,rw /partition/identifier /mount/point |
| 1103 | + # -o, --options <list> comma-separated list of mount options |
| 1104 | + sudo mount --options remount,rw /partition/identifier /mount/point |
1102 | 1105 |
|
1103 | | - # mounted filesystems - table layout; -t --table |
1104 | | - mount | column -t |
| 1106 | + # mounted filesystems - table layout |
| 1107 | + # -t, --table create a table |
| 1108 | + # -s, --separator <string> possible table delimiters |
| 1109 | + mount | column --table |
1105 | 1110 |
|
1106 | 1111 | # filter out some columns, remove table headers, etc. with `column`: |
1107 | 1112 | guix package --list-available="emacs-(ace-jump-helm-line|yasnippet).*" \ |
|
1113 | 1118 | | awk '{print "("$1, "\""$2"\"", $4")"}' |
1114 | 1119 |
|
1115 | 1120 | # align csv file |
1116 | | - cat data.csv | column -t -s ';' |
| 1121 | + # -t, --table create a table |
| 1122 | + # -s, --separator <string> possible table delimiters |
| 1123 | + cat data.csv | column --table --separator ';' |
1117 | 1124 |
|
1118 | 1125 | # :xml command line XML tool (formating) |
1119 | 1126 | xmllint |
|
1334 | 1341 | # network - retcode==1 - online; retcode!=1 offline |
1335 | 1342 | nm-online --exit; echo "retcode: $?" |
1336 | 1343 |
|
| 1344 | + # find out / obtain the names of wired (Ethernet) / WiFi network interfaces |
| 1345 | + # Ethernet interfaces have a type of 1 |
| 1346 | + rg -l '1' /sys/class/net/*/type | cut -d'/' -f5 # wired (Ethernet) |
| 1347 | + iw dev | awk '$1=="Interface"{print $2}' # WiFi |
| 1348 | + |
1337 | 1349 | # wifi net nmcli - command-line tool for controlling NetworkManager |
1338 | 1350 | nm-applet |
1339 | 1351 | man nmcli-examples |
|
1470 | 1482 |
|
1471 | 1483 | # super fast ram disk |
1472 | 1484 | sudo mkdir -p /mnt/ram |
1473 | | - sudo mount -t tmpfs /mnt/ram -o size=8192M |
| 1485 | + # -t, --types <list> limit the set of filesystem types |
| 1486 | + # -o, --options <list> comma-separated list of mount options |
| 1487 | + sudo mount --types tmpfs /mnt/ram --options size=8192M |
1474 | 1488 |
|
1475 | 1489 | # mount / umount (usb) disk without 'root' as the mount command. |
1476 | 1490 | udiskie --verbose # user-level daemon for auto-mounting |
|
0 commit comments