Answer by Kamil Maciorowski for How to sort folders by a specific subfolder's...
This is an example that uses tools available in Ubuntu, but the idea is general and can be implemented with other tools. Even in Ubuntu you may want to adjust the solution to your needs.Place yourself...
View ArticleComment by Kamil Maciorowski on FFmpeg reports an error: No space left on...
Here. Ext4: "Maximum number of files per directory: 10 million approximately (can be extended with large_dir feature)". Relevant?
View ArticleComment by Kamil Maciorowski on How to stop ssh from adding -c before command?
Accepting -c is the right thing to do, probably the simplest solution in this case. See e.g. what tmux does: "This option is for compatibility with sh(1) when tmux is used as a login shell".
View ArticleComment by Kamil Maciorowski on ssh to remote machine delayed ( more than a...
I am unable to parse this sentence(?): "recently this behavior appears before this any login attempt it was success without any delay with in a second or less I am able to login".
View ArticleComment by Kamil Maciorowski on How to delete a file as long as another file...
(1) Must, may or mustn't the solution work in subdirectories? (2) The -r in rm -r only matters if the operand is a directory. You did think about -r. Does this mean that some directories match *.mkv...
View ArticleComment by Kamil Maciorowski on Using a stream editor to put 2 text documents...
stackoverflow.com/q/1620946/10765659
View ArticleComment by Kamil Maciorowski on Delete files if condition is met
The script is flawed: (1) Bash pitfall number one; (2) lack of quoting.
View ArticleComment by Kamil Maciorowski on OpenSSH dynamic port forwarding from server...
I believe the implementation is in the client only and it works with any SSH server that normally supports (regular, former) ssh -R. The point is the server listens and forwards like with any -R. It...
View ArticleAnswer by Kamil Maciorowski for Linux console plain text SVG display or preview
Preliminary noteThe question is explicitly about SVG, but the solutions in this answer work with many other formats of pictures and even videos (in principle; videos may be laggy and there will be no...
View ArticleComment by Kamil Maciorowski on Grub Shutdown and Reboot Entry's
Please do not litter the title.
View ArticleComment by Kamil Maciorowski on Get un-expanded commandline
"the files given to the program are expanded" – What do you mean exactly? If you mean globs like *.txt then they are not given to the program in the first place. The shell expands them before running...
View ArticleComment by Kamil Maciorowski on What is wrong with this bash script (I...
This, this and this; and this and this; possibly more.
View ArticleComment by Kamil Maciorowski on Does ssh remember private keys?
Please don't post images of text.
View ArticleAnswer by Kamil Maciorowski for nc and socat parallel listening the same TCP...
It seems the purpose of the first command is just to append data to /out_socat.txt. socat with fork can handle multiple incoming connections even if they happen in parallel. Parallel appending to a...
View ArticleComment by Kamil Maciorowski on ssh to remote machine delayed ( more than a...
I am unable to parse this sentence(?): "recently this behavior appears before this any login attempt it was success without any delay with in a second or less I am able to login".
View ArticleAnswer by Kamil Maciorowski for Does ssh remember private keys?
Does ssh remember private keys?The answer depends on the implementation of ssh you're using and on your config. Here I will show a possible setup involving ssh from OpenSSH; for this particular setup...
View ArticleAnswer by Kamil Maciorowski for How to delete a file as long as another file...
This portable snippet of shell code will process files in the current working directory (but not in subdirectories):for f in ./*.mkv; do [ -f "${f%.mkv}.mp4" ] && echo rm "$f"doneJust in case,...
View ArticleComment by Kamil Maciorowski on How do I transfer data from stand alone hard...
(1) Photo(s) showing the drive will be helpful. Concentrate on showing its physical interface and the label. (2) New computer of what kind? A laptop? // Please do not respond in comments. [Edit] the...
View ArticleComment by Kamil Maciorowski on Man command broken (MacOS 14.6.1)
"how is $1 changing during a simple function call?" –$1 inside the function comes from the arguments of the function. Now it seems that for some reason $page expands to manman in the line 1397....
View ArticleAnswer by Kamil Maciorowski for How to remove extension from pathname passed...
There is no mechanism in find itself that allows you to get a substring from whatever is substituted for {}. Even adding a suffix (like you did: {}.aac) may be unsupported. POSIX says:A utility_name or...
View Article