Reputation
622
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
5 14
Newest
 Nice Answer
Impact
~144k people reached

1d
awarded  Nice Answer
May
12
comment How do I remove a file with no permissions?
Obviously this does answer the question that was asked. Wiping the disk will remove the file! Ordinarily it is not a reasonable method of removing a file, but in this case, it is the most reasonable way, because it solves the underlying problem at the same time. (Furthermore, even if this did not literally answer the question as it was explicitly asked--which it does!--it's not wrong to post a solution to an OP's actual problem.)
Apr
29
comment What's the difference between “dir” and “ls”?
dir is not provided for backwards compatibility. Instead, ls works the way it does for backwards compatibility (and because lots of users want it to work that way), and dir is provided as an alternative, which the GNU developers consider generally preferable because its output is device-independent. See 4.5 Standards for Interfaces Generally in the GNU coding standards and my answer to that AU question for details.
Apr
24
comment How do I switch from an unknown shell to bash?
As Chris Down says, bash does behave differently in some ways when it sees it's been invoked as sh. It acts as though --norc was passed and it enters POSIX mode.
Apr
21
revised Traverse all subdirectories in and do something in Unix shell script
fixed code formatting; reworded slightly for clarity; removed unnecessary signature
Apr
21
suggested approved edit on Traverse all subdirectories in and do something in Unix shell script
Apr
16
awarded  Yearling
Mar
7
awarded  Nice Answer
Oct
7
comment Who sets $USER and $USERNAME environment variables?
@JosephR. For sudo echo $USER, the shell expands $USER, then calls sudo. So of course it doesn't produce the same output as whoami. Like sudo whoami, sudo sh -c 'echo $USER' does (typically) output root. Regarding your comment about whoami using the EUID, note that sudo whoami would output root even if whoami used the UID. sudo sets both EUID and UID for the command it runs (except in the very unusual situation that you explicitly configure it to behave otherwise). Compare sudo id -u to sudo id -ru.
Oct
4
comment Why doesn't my ~/.bash_profile work?
"Ubuntu specifically discourages using .profile (link)" The wiki did once (absurdly) discourage that; that's been fixed. (Note /etc/profile does remain discouraged for systemwide assignments, in preference for adding scripts to /etc/profile.d.) Per-user .profile files are now presented as one of the recommended ways to set per-user environment variables: "Suitable files for environment variable settings that should affect just a particular user (rather than the system as a whole) are ~/.pam_environment and ~/.profile."
Sep
30
awarded  Explainer
Sep
13
awarded  Civic Duty
Aug
21
comment Desktop background appears black when using XFCE
Does anything different happen if you kill the running xfdesktop process before attempting to run it again? You can do this with killall xfdesktop (then run that again a few seconds later, and if you don't get xfdesktop: no process found, forcibly kill it with killall -KILL xfdesktop). After killing xfdesktop, try running it again, this time without &. The & isn't causing the problem, but by running it in the foreground you're more likely to see output in the terminal that might reveal the nature of the problem. (You can edit your question with detailed results.)
Aug
18
comment Why doesn't the sudo command need the root password?
Related (not a duplicate): How do the internals of sudo work? and (on Ask Ubuntu) How to NOT become a root user? Are administrators root?
Jun
17
awarded  Constituent
Jun
14
awarded  Caucus
Oct
29
awarded  Yearling
Jul
29
revised Writing a driver to fool *nix systems about having a GPU
fixed annoying spelling error
Mar
25
comment Is it recommended to use zsh instead of bash scripts?
The other thing to keep in mind about bash scripts on BSD systems (other than OS X ...if you consider it a BSD system) is that even if bash exists, it is usually not /bin/bash, so a shebang line #!/bin/bash won't usually work. In cases where bash is actually installed, I believe #!/usr/bin/env bash usually will.
Mar
23
comment Recommended Linux distribution or distributions for children
How is Fedora more like Windows in a way that would make it less likely than Ubuntu that someone would use the command line? (I'm not saying you're wrong--I have only minimal recent experience with Fedora.)