Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Update files without changing <DateStamp>?

6 views
Skip to first unread message

no.to...@gmail.com

unread,
Jul 18, 2015, 1:14:42 AM7/18/15
to
Out of a file-tree you need to see the <stack> of recent files,
simular to `ls -t <tree> | head -22`

Because these are the files which relate to the current PANIC!

The following seems to work for me; please advise of
errors/improvements:--
echo "List $ N latest files in current-tree"
find $2 -type f -exec ls -l {} \; |\
awk '{print $6 " : " $8 }' | sort|tail -$1

When examining these recent/hot files, you obviously
want to edit some.
But you don't want to change their <time heirarchy>.
New/additional files can be <correctly> dated.

How could I achieve EASILY this.

==TIA.

Chris Elvidge

unread,
Jul 18, 2015, 11:44:24 AM7/18/15
to
That you Hongyi?


--

Chris Elvidge, England

Joe Beanfish

unread,
Jul 18, 2015, 2:17:26 PM7/18/15
to
On Sat, 18 Jul 2015 05:13:12 +0000, no.top.post wrote:
> When examining these recent/hot files, you obviously want to edit some.
> But you don't want to change their <time heirarchy>. New/additional
> files can be <correctly> dated.
>
> How could I achieve EASILY this.

touch -r fileToEdit fileToEdit.timestamp
FAVORITE_EDITOR_HERE fileToEdit
touch -r fileToEdit.timestamp fileToEdit
rm fileToEdit.timestamp

Put it in a script for ease of use.

Unknown

unread,
Aug 7, 2015, 7:50:12 AM8/7/15
to
~:/:ls -l fileToEdit
-rw-r--r-- 1 root root 162018 2015-08-05 17:01 fileToEdit

/:touch -r fileToEdit fileToEdit.timestamp pico fileToEdit
Fails to start editot

/:pico fileToEdit
Starts editor

/:touch -r fileToEdit.timestamp fileToEdit rm fileToEdit.timestamp
/:ls -l fileToEdit*
-rw-r--r-- 1 root root 162018 2015-08-05 17:01 fileToEdit
-rw-r--r-- 1 root root 0 2015-08-05 17:01 fileToEdit.timestamp

Perhaps the the one, one-liner is a two-command ?

Joe Beanfish

unread,
Aug 7, 2015, 9:39:56 AM8/7/15
to
No, your news reader combined lines. When reading code make sure your
reader is not reformatting. Here's the example again with a blank line\
between each command:

Unknown

unread,
Aug 14, 2015, 10:34:26 PM8/14/15
to
On Fri, 07 Aug 2015 13:38:18 +0000, Joe Beanfish wrote:

> On Fri, 07 Aug 2015 11:48:34 +0000, Unknown wrote:
>
>> On Sat, 18 Jul 2015 18:15:56 +0000, Joe Beanfish wrote:
>>
>>> On Sat, 18 Jul 2015 05:13:12 +0000, no.top.post wrote:
>>>> When examining these recent/hot files, you obviously want to edit
>>>> some.
>>>> But you don't want to change their <time heirarchy>. New/additional
>>>> files can be <correctly> dated.
>>>>
>>>> How could I achieve EASILY this.
>>>
>>> touch -r fileToEdit fileToEdit.timestamp FAVORITE_EDITOR_HERE
>>> fileToEdit touch -r fileToEdit.timestamp fileToEdit rm
>>> fileToEdit.timestamp
>>>
>>> Put it in a script for ease of use.
>>
--- snip --
>> Perhaps the the one, one-liner is a two-command ?
>
> No, your news reader combined lines. When reading code make sure your
> reader is not reformatting. Here's the example again with a blank line\
> between each command:
>
> touch -r fileToEdit fileToEdit.timestamp
>
> FAVORITE_EDITOR_HERE fileToEdit
>
> touch -r fileToEdit.timestamp fileToEdit
>
> rm fileToEdit.timestamp

Thanks for the <extra script>; we need a menu-system for all the scripts.
Perhaps one-of-my NewsReaders smart-arses lines.
Personally I'm a fanatic advocate AGAINST auto-formatters, and can't
accept that a very competent poster's single-quotes are given as *3-bytes*
by his emacs-system.


0 new messages