145 reputation
8
bio website
location
age
visits member for 2 years, 5 months
seen Oct 28 at 22:05

Jun
24
comment Issue on created folder permissions: temporary flag
@kebs That seems to be the manual for some kind of Windows port. It also mentions NTFS and various Windows versions a lot, and “system” and “hidden” flags in the mode…
Apr
19
awarded  Popular Question
Mar
14
comment How to only zip the files of a specific user?
If you don't use zsh, but you happen to have it installed (OS X provides a copy), you can use zsh -c 'zip ...'.
Mar
11
comment Is this redirecting to /dev/null?
Redirecting stdin from /dev/null is the easiest way to get an immediate EOF. How else would you do it?
Feb
26
comment How to find executable filetypes?
The binaries I sampled from my Mac are application/octet-stream; charset=binary, according to both the Mac's file and the file on my Debian box. (Speaking of OS X, the file it includes uses -I instead of -i. Both accept --mime, though.)
Feb
10
comment Why can't I do ls *.txt in a subshell?
Note that double quotes (at least in bash and similar shells like zsh) are not the same as single quotes! For example, parameter expansion ($foo) is done inside double quotes, but not single quotes.
Feb
10
comment Why can't I do ls *.txt in a subshell?
+1 for removing the redundant ls.
Feb
7
comment Run a parallel command while waiting for ssh
Maybe you should find a progress indicator that will die when SIGTERMed or SIGINTed.
Feb
6
awarded  Critic
Feb
6
comment e2fsck -y /dev/sda changed my 6TB disk into 1.8TB
@WigglerJtag slm said you need to see if you can get the filesystem on the disk repaired
Feb
6
comment What's eating my disk space?
I prefer ncdu over plain du for finding large files|directories. It does scan the entire directory tree before it lets you do anything; you may want to pass it a specific path (e.g. ncdu /var or even just ncdu ~)
Feb
5
comment How can I delete input in the terminal?
@terdon Fair enough. I just found it misleading; I would interpret send a process to the background as make a process continue running in the background. According to the image, control-pageup and control-pagedown are supposed to “scroll the terminal, even remote or graphical ones.”
Feb
2
comment Broadcast or send machine readable code to ssh clients
@UzumakiNaruto I have no idea. What happens when you try? (Actually, you should probably ask a new question for that.)
Feb
2
comment Broadcast or send machine readable code to ssh clients
It should also be noted that, because root on the local machine is executing the ssh, ssh will look for the private key in root's home directory, not yours. (Also: does mplayer really require root? It seems to me something like simply playing an audio file shouldn't require root (OS X's afplay doesn't), and to me it doesn't seem a very good idea security-wise to enable root logins just for that.)
Feb
2
comment How can I delete input in the terminal?
Also: control-pageup and control-pagedown don't do anything in bash on my Ubuntu box.
Feb
2
comment How can I delete input in the terminal?
Correction to the did-you-know box: control-c sends SIGINT, not SIGTERM. control-z actually suspends the job (sending SIGSTOP to the process group); you have to issue bg afterwards to make it continue in the background.
Jan
26
comment What is the difference between “du -sh *” and “du -sh ./*”?
@StephaneChazelas Ignoring newlines is a bug? Depends on what the program is doing. If it's fetching the file sizes itself and only handling the raw filenames internally, it doesn't have to do anything. The only problems would arise if the information was presented to the user or received from|passed to another process.
Jan
26
comment What is the difference between “du -sh *” and “du -sh ./*”?
Alternately, this program running as root could be made to print \n literally rather than an actual newline, like Python's repr() does for strings. In case someone makes a file called a\n12\t\xe2\x80\xa4\xe2\x88\x95b.
Jan
26
comment What is the difference between “du -sh *” and “du -sh ./*”?
@StephaneChazelas Wait, so now we're root on a server with sensitive data? I thought we were a regular user, interactively getting disk usage information. Obviously if one is letting anyone create files, then one should be sanitizing the filenames. I would expect that, in production, one wouldn't be running programs that create files with things like newlines in their names.
Jan
25
awarded  Commentator