Quantcast
Channel: User mwfearnley - Unix & Linux Stack Exchange
Browsing all 30 articles
Browse latest View live

Comment by mwfearnley on How to decrypt id_rsa private key?

If you get Bad passphrase., then you might need to convert the key from an "OPENSSH PRIVATE KEY" to "RSA PRIVATE KEY" (stackoverflow.com/a/55817907/446106)

View Article



Comment by mwfearnley on ls -l output in /dev directory of Unix/Linux system

You can get the same output with ls -l /dev/tty?

View Article

Comment by mwfearnley on Finding all storage devices attached to a Linux machine

You can use awk to do grep's work as well: awk '/0$/ {print $1}'

View Article

Comment by mwfearnley on SNMP query the network range for multiple OIDs

It's possible to do something like for ip in 10.{0..255}.{0..255}.{0..255}; do snmpget ....; done, but it will take a long time to scan 16 million IP addresses, particularly if most of them time out.

View Article

Comment by mwfearnley on stat: modification timestamp of a file

Other BSD won't show as Darwin. It might be better to check the version of stat itself. stat --version |& grep -q GNU will be true on GNU and false on BSD (--version will actually return an error...

View Article


Comment by mwfearnley on What is this folder /run/user/1000?

Just to say, $uid doesn't generally store the userid, but according to askubuntu.com/a/468239/37574, $UID does (possibly depending on the shell). So it might be worth using that in the answer instead.

View Article

Comment by mwfearnley on Mark an ext4 filesystem as read-only

If a filesystem has the read-only flag, it should be possible to see it in the filesystem features with something like sudo tune2fs -l /dev/ext4test | grep '^Filesystem features'

View Article

Comment by mwfearnley on How to see list of curl ciphers?

Generating a self-signed cert is as "easy" as openssl req -x509 -subj /CN=example.com -nodes -out cert.pem -keyout key.pem. For some reason the linked answer was deleted, but is at...

View Article


Comment by mwfearnley on How to stop auto mounting of devices in Ubuntu?

Yeah, the GUI option is nice, but if you're willing to run a command-line program anyway (sudo apt install ...), you might as well run a gsettings command instead.

View Article


Comment by mwfearnley on date - Can't Go Back More Than 115 Years or Can't Go...

I suppose the future date problem might either be due to the relative difference or the absolute result. If the latter, can you pin down the exact date that becomes invalid, e.g. date -d '11 Aug 5881588?

View Article

Comment by mwfearnley on How to send Screenshot to STDOUT

Version 1.5 also doesn't seem to work - it just outputs a png file called -.

View Article

Comment by mwfearnley on How to send Screenshot to STDOUT

The ability to use - to save to stdout was added in 1.7, according to github.com/resurrecting-open-source-projects/scrot/commit/…

View Article

Comment by mwfearnley on Merging folders with mv?

If the first -exec can cause the -or to be evaluated if it fails, then I guess this relies either on mkdir -p never failing, or the subsequent mv being harmless if it does?

View Article


Comment by mwfearnley on How to change current copy position or skip over...

Maybe they should revise the note to say something like "this is not necessarily the point from which ddrescue immediately starts working".

View Article

Image may be NSFW.
Clik here to view.

What is the default openSUSE Rescue login?

On booting the Rescue System from an openSUSE DVD, I find myself at a "rescue login" prompt:What are the default login details?

View Article


Answer by mwfearnley for How do I find the offset of an ext4 filesystem?

Based on @derobert's answer, I wrote a program (gist) that will parse an input stream from dd and scan each sector for something that looks like the start of an ext partition.It will work at least as...

View Article

Answer by mwfearnley for Permission denied on mounted devices

I was having "permission denied" errors while trying to read the contents of some files on an NTFS partition - even as root. There were no permissions problems with the folder tree (checked with namei...

View Article


Answer by mwfearnley for How to scroll in a terminal using keyboard?

On FreeBSD, you can use Scroll Lock to toggle screen scrolling mode. Press it once, then use Up/Down, PgUp/PgDown, Home/End to scroll. Press it again to jump back down and resume typing.

View Article

Answer by mwfearnley for Emulate unplugging a network cable with qemu-kvm

Based on the advice at https://lists.gnu.org/archive/html/qemu-discuss/2017-01/msg00103.html, you can plug/unplug a cable in the qemu console using set_link <name> on|off.info network shows you...

View Article

Answer by mwfearnley for Is zswap eligible to reduce swap IO?

At the LSFMM summit in 2013, there was no compression on pages written to the swap device. But it doesn't sound like there are any technical reasons why not, just that it would increase the...

View Article
Browsing all 30 articles
Browse latest View live




Latest Images