Listing posts
Displaying posts 261 - 265 of 328 in total
Mount partition inside a disk image
Last update
2017-10-30
2017-10-30
« — »
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # 1. list image partitions fdisk -lu mydisk.img # Disk mydisk.img: 117 GiB, 125587636736 bytes, 245288353 sectors # Units: sectors of 1 * 512 = 512 bytes # Sector size (logical/physical): 512 bytes / 512 bytes # I/O size (minimum/optimal): 512 bytes / 512 bytes # Disklabel type: dos # Disk identifier: 0x81c0ff4b # # Device Boot Start End Sectors Size Id Type # mydisk.img1 * 8192 124927 116736 57M e W95 FAT16 (LBA) # mydisk.img2 124928 245288352 245163425 116.9G 83 Linux # 2. check used loop devices losetup # NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE # /dev/loop0 0 0 0 0 /mnt/data # 3. mount partition 2 on a free loop device, where image # offset = start * sector size = 124928 * 512 = 63963136 losetup -o 63963136 /dev/loop1 mydisk.img mkdir img && mount /dev/loop1 img/ # 4. dismount & remove device umount img losetup -d /dev/loop1 |
Source: AskUbuntu
~~~ * ~~~
How to manage procrastination
Last update
2017-10-26
2017-10-26
« — »
Pomodoro technique (adjust timings to your needs):
- focus 20-25 minute, make a mark & pause 2-3 minutes
- after 4 marks take a longer pause of 15-30 minutes
- restart loop
Keep close pen & paper to keep track of sudden:
- ideas
- extrernal requests (other people coming to you)
- brain distraction urges (eg: need to check FB, IM, Emails, Calendar, ...)
Source: Dev.to
~~~ * ~~~
Midnight Commander shortcuts
Last update
2017-10-16
2017-10-16
«MC: the "Midnight Commander".
Norton Commander clone/powerup»
Norton Commander clone/powerup»
Panel Functions
Keys | Function |
---|---|
TAB |
switch focus between panels |
Alt ? |
open search (find ) dialog |
Alt s |
incremental search (press again for the next match) |
Alt i |
sync panels directories on current one |
Alt t |
switch among panel layouts in loop |
Ctrl r |
refresh active panel |
Ctrl u |
swap panels |
Common Functions
Keys | Function |
---|---|
Insert |
toggle mark on selected file |
* |
toggle marked files |
+ |
marks files based on a pattern |
- |
unmarks files based on a pattern |
Shift Down |
mark file and move to the next entry |
Shift Up |
mark file and move to the previous entry |
Shift F5 |
copy single file |
Shift F6 |
move single file |
Ctrl x c |
open chmod dialog for marked file |
Ctrl x o |
open chown dialog for marked file |
Ctrl x s |
make a symbolic link of the current file |
Shell functions
Keys | Function |
---|---|
Alt Enter |
copy selected filename in command line |
Ctrl Shft Enter |
copy full path of selected file in the command line |
Alt H |
shows command line history |
Useful settings
Here is my configuration (press F9
to navigate the menu):
Optionmenu |
Option |
---|---|
Configuration | check_box Verbose operation |
check_box Compute totals |
|
check_box Auto save setup |
|
Layout | check_box_outline_blank Hintbar visible |
Panel options | check_box_outline_blank Show hidden files |
check_box Auto save panels setup |
|
check_box File highlight > File types |
|
Appearance | darkfar theme |
Left/Rightmenu |
Option |
---|---|
Listing mode | check_box User defined > half type name | size:4 | perm |
Source: Klimer, MC HP, Kayxl, ArchLinux forum
~~~ * ~~~
~~~ * ~~~
net-tools > iproute2 commands mapping
Last update
2017-10-12
2017-10-12
«ifconfig, route, netstat»
net-tools | iproute2 |
---|---|
arp | ip n (ip neighbor) |
ifconfig | ip a (ip addr) / ip link / ip -s (ip -stats) |
iptunnel | ip tunnel |
nameif | ip link |
netstat | ss |
netstat -r | ip r (ip route) |
netstat -i | ip -s link |
netstat -g | ip maddr |
route | ip r (ip route) |
Source: tecmint guide, Debian 9 release notes, Debian manuals