| bio | website | |
|---|---|---|
| location | Moscow, Russia | |
| age | ||
| visits | member for | 2 years, 8 months |
| seen | 12 hours ago | |
| stats | profile views | 11 |
isidore.john.r at gmail dot com
|
Apr 11 |
comment |
Turn off buffering in pipe @bdonlan: At least on Ubuntu (debian-based), expect-dev provides both unbuffer and expect_unbuffer (the former is a symlink to the latter). The links are available since expect 5.44.1.14-1 (2009). |
|
Apr 11 |
comment |
Turn off buffering in pipe you also need -q on Linux: script -q -c 'long_running_command' /dev/null | print_progress |
|
Feb 28 |
awarded | Yearling |
|
Oct 10 |
awarded | Commentator |
|
Oct 10 |
comment |
Find files which are created a certain time after or before a particular file was created @teenOmar: you might have noticed that I'd not used in my example times that are on the boundaries exactly. Try testBefore.txt with 6:01pm, test.txt with 7pm, and testAfter.txt with 7:59pm. You could use -61 minutes instead of -1 hour to include the boundary. |
|
Oct 10 |
comment |
Find files which are created a certain time after or before a particular file was created @teenOmar: your sentences contradict each over. Does it only finds files newer or older than test.txt? Do you look at the modification times or something else? I don't know how to say it more clearly. For example, if file=test.txt is last modified at 7pm than the command in the answer should find files modified at 6:01pm, 6:30pm, 7:30pm, 7:59pm (same day) and it should not find files modified at 5:30pm, 5:59pm, 8:01pm, 8:30pm. In particular the command should find the file itself. It works as expected on Ubuntu |
|
Oct 9 |
comment |
Find files which are created a certain time after or before a particular file was created if I'm not mistaken your question had linux tag on SO before the merge. Is GNU find available in your environment? |
|
Oct 9 |
comment |
Find files which are created a certain time after or before a particular file was created @teenOmar: It seems I've misread your question. My answer gives files within one hour of test.txt. Your question asks about files outside the time range (the answer could be easily modified just swap +/- in the conditions). To get files modified one hour after test.txt: find -type f -newermt "$(date -r test.txt) +1 hour". |
|
Oct 9 |
comment |
Find files which are created a certain time after or before a particular file was created @teenOmar: -a is correct: the command returns files that should be both newer than test.txt modification time minus an hour and older than test.txt modification time plus an hour i.e., in +/- hour around test.txt time. You can use just test.txt instead of $file. |
|
Oct 7 |
comment |
Find files which are created a certain time after or before a particular file was created @teenOmar: I've added a one-line solution |
|
Oct 6 |
answered | Find files which are created a certain time after or before a particular file was created |
|
Jan 22 |
comment |
Make daemon start up with Linux @Ma7moud El-Naggar: chkconfig creates various symlinks in /etc/rc\d.d/ for you. |
|
Nov 14 |
comment |
How to print the longest line in a file? @Chris Down: It doesn't print the file if you omit command. It is inconvenient if you build command interactively. |
|
Nov 14 |
comment |
How to print the longest line in a file? @Keith Thompson: cat is not useless here. It might be useless to a computer but for a human reader it could provide value. The first variant clearly shows the input. The flow is more natural (from left to right). In the second case you don't know what the input is unless you scroll the window. |
|
Oct 13 |
comment |
Lightweight utility/program to run a command after a random delay you could use *rand48() family instead of rand(). |
|
May 21 |
revised |
Detect if a (NTFS) drive is mounted or not. If not then mount it fix code formatting |
|
May 21 |
suggested | suggested edit on Detect if a (NTFS) drive is mounted or not. If not then mount it |
|
Dec 4 |
awarded | Teacher |
|
Dec 4 |
awarded | Editor |
|
Dec 4 |
revised |
Program that passes STDIN to STDOUT with color codes stripped? added python variant based on colorama |