96,094 reputation
12113238
bio website
location European Union
age
visits member for 2 years, 3 months
seen 43 mins ago

Dec
12
comment only show the source file and target linked file using `ls`
Do you know of any implementation besides modern versions of GNU ls that supports LS_COLORS that way and a --color=always and options after arguments? If on a GNU system, why would you use something that convoluted when you can use find or stat? That also probably won't work if you do some ln -s /// some-file.
Dec
12
comment Is it better to use $(pwd) or $PWD?
some info at unix.stackexchange.com/a/79621
Dec
12
revised only show the source file and target linked file using `ls`
added 40 characters in body
Dec
12
revised only show the source file and target linked file using `ls`
added 268 characters in body
Dec
12
answered only show the source file and target linked file using `ls`
Dec
11
revised cmd2 `cmd1` vs cmd1 | xargs cmd2
added 174 characters in body
Dec
11
comment cmd2 `cmd1` vs cmd1 | xargs cmd2
@wes, It works (with all the caveats) with sqlite3 as well, it's just that sqlite3 happens to read user input from stdin while ls doesn't.
Dec
11
answered Can the shellshock bug be expoloited to run a command as a privileged user?
Dec
11
comment Can the shellshock bug be expoloited to run a command as a privileged user?
See security.stackexchange.com/q/68552 (Note that the accepted answer there is wrong).
Dec
11
revised cmd2 `cmd1` vs cmd1 | xargs cmd2
added 234 characters in body
Dec
11
revised cmd2 `cmd1` vs cmd1 | xargs cmd2
added 29 characters in body
Dec
11
answered cmd2 `cmd1` vs cmd1 | xargs cmd2
Dec
11
revised List files that do not begin with a specific prefix
added 61 characters in body
Dec
11
comment download an image using only the URL in terminal
Do you mean that you want to download the file by just entering the URL at the shell prompt?
Dec
10
comment Security implications of forgetting to quote a variable in bash/POSIX shells
@Barmar, assuming you meant foo='bar; rm *', no it won't, it will however list the content of the current directory which may count as an information disclosure. print $foo in ksh93 (where print is the replacement for echo that addresses some of its shortcomings) does have a code injection vulnerability though (for instance with foo='-f%.0d z[0$(uname>&2)]') (you actually need print -r -- "$foo". echo "$foo" is still wrong and not fixable (though generally less harmfull)).
Dec
10
revised find all end subdirectories in a tree
fixed logic and a few issues. Still not tested ;-)
Dec
10
comment display directories without any sub directories
See also unix.stackexchange.com/q/86394
Dec
10
comment Why does bash display `>` instead of executing my command?
Those > are the secondary prompt (PS2) asking you for the rest of your command (here it expects at least a closing ' (not ) and closing the command substitution).
Dec
10
comment How does Bash get the output of an executed program?
I meant "special" in that when you run a gnome-terminal command, it just instructs a server to spawn a new window, so the extra gnome-terminal processes don't inherit the fds of the gnome-terminal command you run, but those of that server. All those terminals you mention are probably all using vte underneath which probably forgets to close that fd. I'd bet they don't do anything with that fd. xterm and rxvt (separate implementations) don't have a fd open on the slave. It doesn't make sense for the emulator to have a fd there unless they want to run a new shell when the first one's done f.i.
Dec
10
comment How does Bash get the output of an executed program?
I don't know about your GNOME Shell software, possibly it also uses a pseudo-terminal to connect to the stdin/out/err of the applications it launches or it inherits it from the program that started it. You could try and see if it also has a fd open to /dev/ptmx or what its stdin/out/err are. See How can we know who's at the other end of a pseudo-terminal device?