Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ts(1) [minix man page]

TS(1)																	     TS(1)

ts - timestamp input SYNOPSIS
ts [-r] [format] DESCRIPTION
ts adds a timestamp to the beginning of each line of input. The optional format parameter controls how the timestamp is formatted, as used by strftime(3). The default format is "%b %d %H:%M:%S". In addition to the regular strftime conversion specifications, "%.S" and "%.s" are like "%S" and "%s", but provide subsecond resolution (ie, "30.00001" and "1301682593.00001"). If the -r switch is passed, it instead converts existing timestamps in the input to relative times, such as "15m5s ago". Many common timestamp formats are supported. Note that the Time::Duration and Date::Parse perl modules are required for this mode to work. Currently,A converting localized dates is not supported. If both -r and a format is passed, the existing timestamps are converted to the specified format. ENVIRONMENT
The standard TZ environment variable controls what time zone dates are assumed to be in, if a timezone is not specified as part of the date. AUTHOR
Copyright 2006 by Joey Hess <> Licensed under the GNU GPL. moreutils 2011-04-01 TS(1)

Check Out this Related Man Page

GMDATE(3)								 1								 GMDATE(3)

gmdate - Format a GMT/UTC date/time

string gmdate (string $format, [int $timestamp = time()]) DESCRIPTION
Identical to the date(3) function except that the time returned is Greenwich Mean Time (GMT). PARAMETERS
o $format - The format of the outputted date string. See the formatting options for the date(3) function. o $timestamp - The optional $timestamp parameter is an integer Unix timestamp that defaults to the current local time if a $timestamp is not given. In other words, it defaults to the value of time(3). RETURN VALUES
Returns a formatted date string. If a non-numeric value is used for $timestamp, FALSE is returned and an E_WARNING level error is emitted. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.1.0 | | | | | | | The valid range of a timestamp is typically from | | | Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 | | | 03:14:07 GMT. (These are the dates that corre- | | | spond to the minimum and maximum values for a | | | 32-bit signed integer). However, before PHP 5.1.0 | | | this range was limited from 01-01-1970 to | | | 19-01-2038 on some systems (e.g. Windows). | | | | | 5.1.1 | | | | | | | There are useful constants of standard date/time | | | formats that can be used to specify the $format | | | parameter. | | | | +--------+---------------------------------------------------+ EXAMPLES
Example #1 gmdate(3) example When run in Finland (GMT +0200), the first line below prints "Jan 01 1998 00:00:00", while the second prints "Dec 31 1997 22:00:00". <?php echo date("M d Y H:i:s", mktime(0, 0, 0, 1, 1, 1998)); echo gmdate("M d Y H:i:s", mktime(0, 0, 0, 1, 1, 1998)); ?> SEE ALSO
date(3), mktime(3), gmmktime(3), strftime(3). PHP Documentation Group GMDATE(3)
Man Page

10 More Discussions You Might Find Interesting

1. What is on Your Mind?

Whats Behind Your Name?

Looking at the member list, there are alot of interesting names, some unique, some bizarre, and some that are just plain. How did you come by your name? Why did you choose your label? Me? Well, I wish I could change mine. I chose Google because thats how I stumbled upon this site. I wasn't sure... (66 Replies)
Discussion started by: google
66 Replies

2. Shell Programming and Scripting

Please help!!!

All, I need l help in writing a script; I have a file with header on the first row data rows next and the last row in the file contains the record count of the data records only. I need to remove the last and first line and check to see that the data rows match the count on the last line. ... (61 Replies)
Discussion started by: mhssatya
61 Replies

3. Shell Programming and Scripting

Tricky Shell script

The Problem is mentioned below (61 Replies)
Discussion started by: namishtiwari
61 Replies

4. Shell Programming and Scripting

Date format

Hi, I need to conver the date format to binary and then subract it by one which will result me an output with yesterdays date and use it.. So that i will use the out and delete all the folders which are of minus one days.i.e if today is 2010-03-18 (this is a folder format at some xyz location).... (59 Replies)
Discussion started by: j_panky
59 Replies

5. Shell Programming and Scripting

Bash can't find file but tcsh can why?

I have a short script for compiling an old program. It's a simple text file 'ccprog' created in emacs. The permissions were changed with 'chmod 775 ccprog' to make it an executable. When I try to run ccprog I get "bash: ./ccprog: No such file or directory". If I change to tcsh ccprog runs. Why... (68 Replies)
Discussion started by: muddauber
68 Replies

6. Shell Programming and Scripting

Copy file to SD card from internal flash.

Hi, At first I have to say that I know nothing about Linux :( But I am looking for solution how to copy one file from internal Lowrnace HDS flash memory. Lowrance HDS is Linux based device. Here is the link for firmware update files for this unit. At the end of main firmware file there... (62 Replies)
Discussion started by: PouchX
62 Replies

7. Post Here to Contact Site Administrators and Moderators

Bits - The Unix and Linux Forums (Experimental) Virtual Currency

Hello. I've searched the site but can't find a link to what the "Bits" and "bank account" is on my user profile. Can someone link me or briefly explain? (76 Replies)
Discussion started by: candlejack
76 Replies

8. Shell Programming and Scripting

Extract sequences of bytes from binary for differents blocks

Hello to all, I would like to search sequences of bytes inside big binary file. The bin file contains blocks of information, each block begins is estructured as follow: 1- Each block begins with the hex 32 (1 byte) and ends with FF. After the FF of the last block, it follows 33. 2- Next... (59 Replies)
Discussion started by: Ophiuchus
59 Replies

9. Shell Programming and Scripting

Tetris Game -- based on a shell script (new algorithm)

GitHub - deepgrace/tetris: Tetris implementation in all kinds of Programming Languages Usage: bash Tetris_Game ] ] ] ] Range: #!/bin/bash # Tetris Game // The Art Of Shell Programming box0=(4 30) box1=(4 30 4 32) box2=(4 30 5 32) box3=(4 28 4 30 4 32) box4=(4 28 4 30... (69 Replies)
Discussion started by: complex.invoke
69 Replies

10. Shell Programming and Scripting

The Start Of A Simple Audio Scope Shell Script...

This is a DEMO shell script to generate a simple graticule and plot inside it... Apologies for any typos... it is another building block along with my other two shell uploads recently to start a semi_serious project of an Terminal_AudioScope... The fist upload I posted recently was to show... (83 Replies)
Discussion started by: wisecracker
83 Replies