Quantcast
Channel: User Kamil Maciorowski - Super User
Browsing all 645 articles
Browse latest View live

Comment by Kamil Maciorowski on How to get a large file on a completely full...

Instead of creating "the other part" inside another filesystem (right?), create a regular file there, use losetup to associate a loop device with the file, then add the device to the btrfs. This way...

View Article


Comment by Kamil Maciorowski on Windows command to clear all metadata in...

@MarkusScheifinger Consider accepting the answer. See this.

View Article


Comment by Kamil Maciorowski on How to disable tmux prefix

Possible problem: AFAIK there is no standard character or sequence for Ctrl+Shift+T in a terminal. Upon Ctrl+Shift+T you will probably get ^T, i.e. the same character as for Ctrl+T, unless you...

View Article

Answer by Kamil Maciorowski for How to find file names but only with grep...

There is no need to pipe to grep.find . -type f -name "*dan*" \( -path '*?html*' -o -path '*?php*' \)Your grep '.html' would match html preceded with any character (as . in regex matches any character)...

View Article

Comment by Kamil Maciorowski on How to connect via SSH through multiple...

This is exactly the way keys work with ssh -J. See this answer.

View Article


Comment by Kamil Maciorowski on How to run ncat -zv without showing version...

I think your two ncs are different programs. See this answer.

View Article

Comment by Kamil Maciorowski on linux find command, using delete and prune...

@bkeahl ; terminates the -exec expression. To understand the backslash, see the beginning of this answer.

View Article

Comment by Kamil Maciorowski on SSH passwordless failing

"All nodes share a file space" -- Does this mean you expect the changes you did to the local ~/.ssh/authorized_keys to apply to other nodes? Log in with your password and confirm it's really the case.

View Article


Comment by Kamil Maciorowski on What are the Windows and Linux commands to...

(1) The Linux command you posted is a one-line command. Does it do what you want? Is its complicated from the only problem with it? To call it by a simple name (e.g. ssg ":22"), you need to build a...

View Article


Answer by Kamil Maciorowski for Delete directories containing only .directory...

You mentioned find -empty, so your find is probably GNU find. In this answer I will use several non-portable features of GNU find.Please test my solution in an expendable directory first. The solution...

View Article

Answer by Kamil Maciorowski for Why does `find` in Linux skip expected...

Other answers concentrate on the behavior of -o and they are right, but this is only half of the story. The other half is the behavior of the implicit -print.In some circumstances find adds an implicit...

View Article

Comment by Kamil Maciorowski on bash: "no such file or directory" for...

(1) /opt/oracle/jdk1.8.0_431/bin/java is an absolute path, so the shell does not use $PATH to "resolve" it. (2) What is the output of file /opt/oracle/jdk1.8.0_431/bin/java? (3) This maybe?

View Article

Comment by Kamil Maciorowski on Is there a reason why I can't use find to...

Please do not multi-post. For the record, another copy is on Unix & Linux SE.

View Article


Comment by Kamil Maciorowski on SFTP setup with multiple users

%h or %u in ChrootDirectory is the way to go, if you want to totally separate users. Then this answer.

View Article

Comment by Kamil Maciorowski on How to specify new current directory in shell...

ProtectHome=?

View Article


Comment by Kamil Maciorowski on Advanced argument escaping with find + xargs...

Do not embed {} in the shell code.

View Article

Answer by Kamil Maciorowski for How to create SFTP user with specified...

the user doesn't see his own home folder (/home/example.com)Yes and no. The directive ChrootDirectory %h makes the real /home/example.com appear as / to the user. The user sees this /, so he kinda sees...

View Article


What is the second sh in `sh -c 'some shell code' sh`?

QuestionI encountered the following snippet:sh -c 'some shell code' sh …(where … denotes zero or more additional arguments).I know the first sh is the command. I know sh -c is supposed to execute the...

View Article

Answer by Kamil Maciorowski for What is the second sh in `sh -c 'some shell...

Preliminary noteIt's quite uncommon to see sh -c 'some shell code' invoked directly from a shell. In practice, if you're in a shell then you will probably choose to use the same shell (or its subshell)...

View Article

Comment by Kamil Maciorowski on Using find with -exec gzip and grep

"Find is looking for \; or \+, but reads |." – This statement is wrong. find does not see the | at all, the shell uses it to build the pipe first. And find -exec does not look for \; or \+, it demands...

View Article
Browsing all 645 articles
Browse latest View live