77,856 reputation
1082185
bio website
location European Union
age
visits member for 1 year, 11 months
seen 37 mins ago

2h
comment A log which holds all actions
You could log the unlink, rmdir and rename system calls with the audit system (auditctl).
4h
answered How can I test if a variable is empty or contains only spaces?
4h
comment Root and my password are the same
Separate users doesn't necessarily mean separate User IDs. User IDs have no bearing on this. The primary key in /etc/passwd, /etc/shadow is the user name, not user ID (which is not even mentioned in /etc/shadow).
5h
comment How can I suppress the space between generated arguments during brace expansion?
No, brace expansion is not adding the space, it's creating several arguments to echo. That's echo that prints its arguments separated by spaces.
5h
revised How can I test if a variable is empty or contains only spaces?
added 152 characters in body
5h
comment How can I test if a variable is empty or contains only spaces?
You need [[ $param = *[!\ ]* ]] in mksh.
15h
comment Recover files after moving directory names?
Were the (non-hidden) files all renamed with #_* appended to their name?
20h
comment Using sed to replace characters between two patterns
Try sed $'/^NAME/{N;s/\\n/\t/;}'
21h
comment how to get the basename of complicated files
It only worked because set is a special builtin. For mksh, see thread.gmane.org/gmane.os.miros.mksh/424
21h
comment Sort installed applications according by usage frequency?
See unix.stackexchange.com/a/110446/22565
22h
comment how to get the basename of complicated files
Note that the above doesn't work in bash (except in sh emulation) and you get an odd behaviour with mksh
22h
comment Piping the output of ls or tree to less loses colors?
@JosephR. the other question is half-related but not a duplicate. Here we're talking ls (not tree) for which some implementations need to be told to force color output when the output doesn't go to a terminal (in addition to less -R being needed)
22h
revised Get exit status of process that's piped to another
PIPESTATUS was added in bash2.0 decades ago.
23h
comment how to get the basename of complicated files
The usual warning about basename vs ${var##*/}: it doesn't work properly for path/to/dir/ or /. You'd want basename -- "$filepath" (for paths that start with -).
1d
comment Finding a file which created X minutes back (without GNU/BSD find)
@Aravind, TZ=ZZZ0 touch defines the current timezone as being called ZZZ (the name doesn't matter so picking a random meaningless one to avoid confusion) and being 0 hours off from UTC for the touch command.
1d
comment how to remove all double quotes from csv except specific field
With GNU sed: sed 's/\s*"\s*//3g'
1d
comment When and how was the double-dash (--) introduced as an end of options delimiter in Unix/Linux?
@MarkPlotnick, actually the getopt as found on SysIII (1980) supports --.
1d
comment When and how was the double-dash (--) introduced as an end of options delimiter in Unix/Linux?
BSD4.3RENO at least had a getopt that supported --.
2d
awarded  Nice Answer
Jul
27
awarded  environment-variables