Comment by Kamil Maciorowski on How to efficiently count instances of strings...
Side note: in the *nix world piping few common tools together is hardly ever considered coding, even if it includes (simple) code for sed, awk or sh. It's a standard way of creating solutions that fit...
View ArticleAnswer by Kamil Maciorowski for How to print all lines matching the pattern 1...
<data sed -n ' /someheader/ {h;d} /zzz/ { x /./ p s/.*// x p d }'Explanation:If the current line contains someheader, copy it to the hold space for later; delete the pattern space and start a new...
View ArticleComment by Kamil Maciorowski on How can I find where a command is being ran...
Some ideas: (1) Just in case run your grep without -w. (2) Run a similar command on your home directory withoutsudo. The point is there are possible setups where root cannot read user's files easily...
View ArticleComment by Kamil Maciorowski on What is the best way to concatenate large...
4 TB (TiB?) may be the limit of the target filesystem. What is the target filesystem?
View ArticleComment by Kamil Maciorowski on Prevent idle ssh disconnect
unix.stackexchange.com/a/767515/108618
View ArticleAnswer by Kamil Maciorowski for How do I resize tmux pane by holding down...
By default these bindings (among others) are active:bind-key -r -T prefix M-Up resize-pane -U 5bind-key -r -T prefix M-Down resize-pane -D 5bind-key -r -T prefix M-Left resize-pane -L 5bind-key -r -T...
View ArticleComment by Kamil Maciorowski on Powershell Get-ChildItem odd behavior
@Teknowledgist As a sanity check start over in a clean PowerShell and paste the commands copied from your question. Do you still get the unexpected results?
View ArticleComment by Kamil Maciorowski on Can `ssh` be configured to failover to a...
Related: SSH wrapper that tries several connection parameters.
View ArticleComment by Kamil Maciorowski on Is it dangerous to keep a laptop on sleep...
I think "sleep mode for infinitely long is fine, not dangerous" and "could even lead to complications, such as data corruption, if left unattended for a long time" are contradictory.
View ArticleAnswer by Kamil Maciorowski for Uses of single-partition disk configuration
Is there any reason why a partition would be used in this case rather than a whole disk?Few reasons I can think of:People (read: future admins) expect partition tables. Having them saves WTF moments....
View ArticleComment by Kamil Maciorowski on How to increase a partition on a Raspberry Pi...
And for users who find the idea of deleting the partition disturbing: this answer.
View ArticleAnswer by Kamil Maciorowski for Beaglebone Black filesystem resize -...
Partitions and filesystems are not the same. At no point the filesystem was destroyed.Partition is just a part of a larger device, identified by some entry in a partition table. fdisk manipulates this...
View ArticleComment by Kamil Maciorowski on Why is curl blocked by site even through...
Quote the URL argument properly. These [1] 10869[2] 10870 lines indicate that the shell runs something in the background and this is because of unquoted & characters. You definitely don't want to...
View ArticleComment by Kamil Maciorowski on How to partition a file without root in a Linux?
udisksctl loop-setup …?
View ArticleComment by Kamil Maciorowski on How Does the Linux Kernel Know How to Run...
An example of using the mechanism: here.
View ArticleComment by Kamil Maciorowski on The implementation of the at command
In Debian the manpage for at does say "see also: atd(8)" and man 8 atd mentions /var/spool/cron/atjobs (yes, the directory is different). So at least in Debian the documentation is decent enough in...
View ArticleComment by Kamil Maciorowski on How to determine the use of a mystery...
@DrMoishePippik Unlikely. parted would have printed linux-swap or so, but it printed ext4.
View ArticleAnswer by Kamil Maciorowski for How to determine the use of a mystery...
About parted"Partition Table: loop" is parted's way of saying that there is actually no partition table. Misleading, I know.Not having a partition table is totally normal in this case, because your...
View ArticleComment by Kamil Maciorowski on can dd be used to wipe clean a directory?
-1. While not quoting the variable, not using IFS= read -r and piping from find to while read in the first place are bugs that will make the code fail for some pathnames (but they may also make the...
View ArticleComment by Kamil Maciorowski on Search for exe file within a condition
"Wrapping the entire find command in backticks and passing it as the first argument to mv" is flawed. In many cases it won't be "the first argument" but "arguments": sometimes the pathnames you want,...
View Article