ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: php-coder <php-coder@ngs.ru>
To: community@altlinux.ru
Subject: Re: [Comm] date & time of file modification in shell
Date: Fri, 8 Apr 2005 19:00:11 +0700
Message-ID: <20050408120011.GA4382@mycomp.mydomain> (raw)
In-Reply-To: <42564CEA.5000104@ngs.ru>


--- Denis G. Samsonenko 2005-04-08 04:20:42 -0500
+++ php-coder 2005-04-08 18:58:12 +0700

> Я имел в виду, что нельзя регулировать формат выдачи даты модиыикации. 
> Т.е. он даёт в виде 2005-04-08 10:47:35.000000000 +0700, а мне, 
> например, хотелось бы в виде 08.04.2005 10:47:35. 

    Тут нужно использовать мощь шела ;) Не stat'ом единым))
	
    [c0der@mycomp ~]$ ./stat	18:59
    08.04.08 18:26:41
    [c0der@mycomp ~]$ cat stat	18:59
    STAT=$(stat -c %y ~/.mutt/mail/community | cut -d. -f1)
    STAT_TIME=$(echo $STAT | cut -d' ' -f2)
    STAT_DATE=$(echo $STAT | cut -d' ' -f1 | awk -F- '{printf $3"."$2"."$3}')
    echo $STAT_DATE $STAT_TIME
    [c0der@mycomp ~]$

    :-)

-- 
+ php-coder
+ php-coder[at]ngs[dot]ru
+ ALTLinux Master 2.4 (kernel 2.4.26-std-up-alt10)



  reply	other threads:[~2005-04-08 12:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-06  9:53 Denis G. Samsonenko
2005-04-06  9:01 ` Mike Lykov
2005-04-06 12:50   ` Denis G. Samsonenko
2005-04-06 19:15     ` Dmitry V. Levin
2005-04-08  4:01       ` php-coder
2005-04-08  9:20         ` Denis G. Samsonenko
2005-04-08 12:00           ` php-coder [this message]
2005-04-08 13:02             ` php-coder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050408120011.GA4382@mycomp.mydomain \
    --to=php-coder@ngs.ru \
    --cc=community@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git