| bio | website | |
|---|---|---|
| location | ||
| age | ||
| visits | member for | 2 years, 8 months |
| seen | Apr 26 at 15:55 | |
| stats | profile views | 39 |
|
Mar 20 |
comment |
Find and remove large files that are open but have been deleted If you know the pid then you can use lsof -p <pid> to list its open files and their sizes. The deleted file will have a (deleted) next to it. The deleted file will be linked at /proc/<pid>/fd/1 probably. I don't know how to make a process stop writing to its file descriptor without terminating it. I would think that would depend on the process. |
|
Mar 10 |
comment |
How to get UUID for a USB drive? Your sed -n "p" is redundant, it just prints what it gets unaltered, like cat. |
|
Mar 10 |
answered | How to get UUID for a USB drive? |
|
Mar 3 |
comment |
Send update ping to ping services in Terminal? See this answer from stackoverflow :http://stackoverflow.com/a/2219094. It looks like you can submit your site once manually then just access the resulting URL to update. You could then copy this URL and access it with wget via a cronjob. |
|
Mar 3 |
revised |
Device mounted read/write, but can't delete files formatting / linebreaks |
|
Mar 3 |
comment |
Send update ping to ping services in Terminal? Going to http://rpc.pingomatic.com/ with a web-broswer shows "XML-RPC server accepts POST requests only./". I suspect you don't want to ping it, you want to send an http POST. |
|
Mar 3 |
suggested | suggested edit on Device mounted read/write, but can't delete files |
|
Feb 23 |
comment |
How can I change the umask for one command only? I confused $ ( with $( in your comment, now I understand: ( umask 0022; cmd ). |
|
Feb 17 |
comment |
How to find and replace a particular string in a specific line Using regex to manipulate XML will be fragile, there will always be edge-cases you can't account for. For anything more than the most trivial problems you are wiser to use an XML library with perl, python, etc. |
|
Feb 16 |
comment |
What's the difference between a hard links and copied files? I think Alan's answer to this has an important point: changing a file changes all it's hardlinks, with a copy they would have different content. |
|
Feb 9 |
comment |
Change behaviour of the modifier keys system-wide I just lazily copied the command from the superuser link! Now my previous comment is outside the edit window. It looks like the real command is: xkbset sticky -twokey -latchlock. |
|
Feb 8 |
comment |
Change behaviour of the modifier keys system-wide The term you are looking for is "sticky keys". A similar question has been asked on superuser: use xbset sticky -twokey -latchlock. |
|
Feb 4 |
comment |
ImageMagick to detect numbers @graphicsman: If you want to read barcodes from images you could try zbar |
|
Feb 3 |
comment |
Use desktop speakers over SSH from laptop @MarshallHouse: is your non-root user a member of the audio group or similar? Try ls -l /dev/dsp to see which group you need to be member of to have write access. |
|
Jan 12 |
comment |
Why is $'\0' the same as ''? @slhck: Sorry, I didn't make myself clear. You asked "why are '' and $'\0' the same?", michas gave the proximate explaination of "that's what the code does". I outlined an alternative way of handling the empty string that I saw as equally reasonable and suggested that chosing one or the other was simply a matter of convention or happenstance. |
|
Jan 12 |
comment |
Why is $'\0' the same as ''? But one could regard any string as containing arbitrarily many empty strings, e.g. if you concatenate '' and "X" you get "X". So the you could argue that the first substring bash encounters is the empty string. For example if you use the empty string in javascript's split() it will split between each character. I suspect a "for historical reasons" may be the best explanation we can get. |
|
Dec 27 |
comment |
How can I get a total for space used by a group of subdirectories I think using awk to sum the column would be more elegant some thing like du -ks /ftp/data/*/*/211 | awk '{ n+=$1; }; END { print n; }' |
|
Dec 24 |
comment |
Delete backward until met a char, like alt + bksp The answer @Giles gives is more elegant than mine: use Ctrl + R : to search. |
|
Dec 24 |
comment |
Delete backward until met a char, like alt + bksp I didn't know the current line counted as part of the history — nice! |
|
Dec 23 |
answered | Delete backward until met a char, like alt + bksp |