| bio | website | |
|---|---|---|
| location | ||
| age | ||
| visits | member for | 2 years, 2 months |
| seen | Mar 18 at 21:21 | |
| stats | profile views | 22 |
|
Mar 10 |
comment |
Give a warning when something is about to be deleted (by root) I see... but (from your other comment) it looks like you don't need the data themselves, you only need the directory to exist. I start all scripts by creating their destination directories (if applicable), since while testing I often remove them. I like my scripts to be as self-contained as possible. |
|
Mar 10 |
asked | Enable kill X.org with an own key combination |
|
Mar 7 |
comment |
What customizations have you done on your shell profile to increase productivity? I defined my mtd() { mcd $TMP/`date +%y%m%d-%H%M%S-%N`; }. It probably lacks a portability, but it's good enough for me. |
|
Mar 7 |
comment |
What customizations have you done on your shell profile to increase productivity? +1 I've been using my version of mcd for many years and am going to add something like mtd soon. |
|
Mar 7 |
comment |
What customizations have you done on your shell profile to increase productivity? My calculator is alias py='PYTHONSTARTUP=~/.pythonstartup python' with from math import *; in that file. The integer-division problem remains unsolved, but it's way more usable for more complex operations. |
|
Mar 4 |
comment |
Which is the safest way to get root privileges: sudo, su or login? Did you tried it? I did: bash: alias: `/usr/bin/sudo': invalid alias name |
|
Mar 2 |
answered | use 'find' to search for directories !containing certain filetype foo |
|
Mar 1 |
comment |
How to remove all empty directories in a subtree? It was not the removal but the process start up overhead, what took nearly all the time. I had overlooked the -depth argument, which makes rmdir -p useless. I've changed my comment already. The 90 s was my original attempt; there's nothing surprising here. |
|
Mar 1 |
awarded | Scholar |
|
Mar 1 |
accepted | How to remove all empty directories in a subtree? |
|
Mar 1 |
comment |
How to remove all empty directories in a subtree? That's it. Instead of 90 seconds it takes 0.90 s. |
|
Mar 1 |
awarded | Student |
|
Mar 1 |
asked | How to remove all empty directories in a subtree? |
|
Mar 1 |
comment |
Give a warning when something is about to be deleted (by root) Why do you place something of any value into /tmp? On some systems, it's just a tmpfs living in the virtual memory. You could hardlink the important files into another directory, so they stay there even if removed from /tmp. |
|
Mar 1 |
comment |
Truncate a file on a certain pattern Something like perl -0777 -pe 's/\xFF\xFF\xFF\xFF.*//s' < infile > outfile, but I don't know how to set the encoding now. |
|
Mar 1 |
awarded | Teacher |
|
Mar 1 |
answered | Truncate a file on a certain pattern |
|
Feb 28 |
awarded | Supporter |