Reputation
6,015
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
2 18 28
Newest
 Necromancer
Impact
~462k people reached

Mar
12
comment can not chown a file from my $user to another $user
POSIX: "[EPERM] The effective user ID does not match the owner of the file, or the calling process does not have appropriate privileges and POSIX_CHOWN_RESTRICTED indicates that such privilege is required."
Mar
12
comment can not chown a file from my $user to another $user
I've seen it on a UNIX system some years ago; I don't remember the exact details off the top of my head, but I think it was an Alpha OSF1 system. See man pathconf; calling it with _PC_CHOWN_RESTRICTED tells you whether chown is restricted to root for the given path. (I don't think Linux lets you remove that restriction.)
Mar
12
comment Is this redirecting to /dev/null?
@Tonny: How is it overkill?
Mar
12
comment can not chown a file from my $user to another $user
The ability for a non-root user to "give away" files can actually be configured per filesystem, at least on some OSs. But giving non-root users that ability can open security holes, so it's usually disabled.
Mar
4
answered Bash autocompletion for an environment variable holding a directory name
Mar
4
comment When a member of multiple groups, how do I set the default group for newly created files?
It's important to note that newgrp launches a new shell. I don't think there's any way to change the default group for an existing process.
Feb
25
comment What is the `[` program that resides in my system's /bin?
Minor quibble: test and [ are almost the same. [ requires a closing ]; test does not allow it (or rather doesn't treat an argument of ] specially).
Feb
25
comment What is the `[` program that resides in my system's /bin?
@StephaneChazelas: All shells? (csh and tcsh don't, but perhaps that's beside the point.) I don't think I've seen an sh-derived shell that doesn't have [ as a builtin, but don't think [ was a builtin in the original Bourne shell. In any case, removing /bin/[ would certainly be a bad idea.
Feb
19
comment Why does curl command take urls with parameters as input
The "bare" case is irrelevant; the shell is interpreting the & character and not passing it on to curl. The others are problematic, but can be reduced to the case with single quotes. I suggest removing all but the single-quote case from your question to avoid confusion.
Feb
13
comment What is the `[` program that resides in my system's /bin?
Scripts written for shells that don't have [ as a built-in command will break. Most shells do. Still, I certainly wouldn't recommend removing /bin/[.
Feb
12
comment Adding useraccount as root using “usermod -G root useraccount”?
"But this does not seem to work" is probably the least useful possible description of any problem. How does it not work?
Feb
12
comment What do these commands mean?
Things like $# are unfortunately difficult to find in the bash documentation. See this question.
Feb
12
comment what is $# used in a script for?
Things like $# are unfortunately difficult to find in the bash documentation. See this question.
Feb
11
comment What makes the files in my home directory appear, when I log in through SSH then run ecryptfs-mount-private?
Display of hidden files (files whose names start with .) is controlled by the -a or -A option of ls (-A is like -a except that it omits . and ..). Whether ll shows hidden files depends on how ll is defined. The permissions of a symbolic link are unimportant; it's the permissions on the target file that matter.
Feb
8
comment Map Caps Lock to Control in Linux Mint
Can you update your question to indicate exactly what the latest version is? This question could be here for years.
Feb
5
comment cd ${DIR_PATH} returns 'No such file or directory'
So what happens when you copy-and-paste the command in my previous comment? (My point is that I can't think of any reason why the ~ shouldn't have worked.)
Feb
4
comment cd ${DIR_PATH} returns 'No such file or directory'
I didn't downvote, but can you answer the question in my previous comment?
Feb
4
comment cd ${DIR_PATH} returns 'No such file or directory'
Is the path literally ~/concrete/path, or could there be spaces or other special characters in the directory path?
Feb
4
comment cd ${DIR_PATH} returns 'No such file or directory'
Copy-the following as a single line and paste it to your shell prompt: export DIR_PATH=~/concrete/path ; echo DIR_PATH=${DIR_PATH} ; cd ${DIR_PATH} ; pwd
Feb
4
comment cd ${DIR_PATH} returns 'No such file or directory'
That's odd; it works for me on Linux with bash 3.2.25 and 4.2.37. What does echo $BASH_VERSION print?