1,301 reputation
27
bio website
location
age
visits member for 2 years, 6 months
seen Jul 18 at 21:51

Jul
18
comment Encrypting drive which has content
Yeah, you will most likely lose the contents when you add encryption to it, but isn't that why you copied all the files from the first drive to the second driver in the first place? So that the first drive is now free to be reformatted? BTW: best if you copy&paste the (textual) procedure or at least link to it. Speaking personally, I'm not inclined to go over to Youtube and watch a video in order to understand your question.
Jul
17
comment (cp is to cat AS mv is to ?) mv multiple files into one file instead of cat * rm *
If it is pioneered first by a single type of file system, it could become generic later. For example after Btrfs added support for cloning, someone became interested in supporting the same thing via the same system call in a fuse filesystem. Also, your remark "there's no rule saying a filesystem has to be block-based in the first place..." is quite on the mark. I guess all is possible as long as we're theorizing about potential future filesystem features! :-)
Jul
17
comment (cp is to cat AS mv is to ?) mv multiple files into one file instead of cat * rm *
TBH, a filesystem that really wanted to get around this problem could simply add internal support for the concept of partially filled blocks. In fact, it looks as though Btrfs might actually already support it at the system call level using clone ranges. I didn't confirm whether or not you could really use this to clone ranges from multiple source files into a single destination file, but if it isn't actually implemented then nothing prevents it in theory. Someone even wanted to add support for clone range in cp!
Jul
17
comment Verify the length of a variable
Your script works correctly in standard POSIX /bin/sh. You should consider changing the shebang line to #!/bin/sh so that it will be more portable and run in environments where bash isn't available. Plus, /bin/sh might be a more lightweight shell like dash which isn't burdened with features meant for interactive use.
Jul
17
answered Restricted ssh remote execution with arguments
Jul
17
answered use mosh without giving up local scrollback / history?
Jul
15
comment How to programmatically retrieve the GID of a running process
@MarkPlotnick great idea, I didn't think of that.
Jul
5
comment Why does “cat ttyUSB0” not produce output?
But this is a question about a serial port. The fact that the serial port is connected with USB is neither here nor there.
Jul
5
answered Securely tunnel port through intermediate host
Jul
5
answered Sanity check/cleanup for swap — essentially mkfs.swap
Jul
4
comment Is it possible to use shell parameter variables ($1, …, $@) directly in CLI?
(find $1) /tmp is a syntax error. Actually (any-command) more-arguments is a syntax error. Can you explain differently what you're trying to do?
Jul
3
comment How to interleave the lines of two or more files?
+1 for "There's an app for that!"
Jul
3
answered Process management and pkill
Jul
3
answered Using variables to store terminal color codes for PS1?
Jul
3
comment How to programmatically retrieve the GID of a running process
@slm The OP already mentioned getegid() and that system call is only able to give you your own GID, not that of another process. Too bad about that :-(
Jul
3
comment How do I generate SSHFP records?
For the record, ssh-keygen -r does generate SSHFP records for existing keys despite the fact that the name of the command suggests it's only for GENerating.
Jul
3
comment How to programmatically retrieve the GID of a running process
@slm No, getpgid concerns the PGID = process group ID, which is a parameter related to job control and not related to the security credentials UID/EUID/GID/EGID
Jul
3
answered How to programmatically retrieve the GID of a running process
Jul
3
comment forgot to luksClose usb persistent partition, is this a problem?
I'm almost sure enough to provide this as an answer but not quite. You did umount and that should be enough. The dmcrypt layer shouldn't be holding on to any uncommitted data after that.
Jun
26
comment Tilde (~) inside working unix directory
+1 for recommending to omit violent options by default. This is akin to doing kill -9 by default, which I've seen.