04-30-2006
Hello,
Try passing "--full-time/--time-style" to ls command:
Quote:
--time-style=STYLE
show times using style STYLE: full-iso, long-iso, iso, locale, +FORMAT
FORMAT is interpreted like `date'; if FORMAT is FORMAT1<newline>FORMAT2, FORMAT1 applies to non-recent files and FORMAT2 to recent
files; if STYLE is prefixed with `posix-', STYLE takes effect only outside the POSIX locale.
Here is a little example:
Quote:
$ ls -l --full-time /etc/passwd
-rw-r--r-- 1 root root 1158 2006-04-26 20:49:57.000000000 +0200 /etc/passwd
$ ls -l --full-time /etc/passwd | awk ' { print $6 } '
2006-04-26
Try also with "stat" command:
Quote:
$ stat -c %x /etc/passwd
2006-04-30 15:01:01.000000000 +0200
Read the differences between times in UNIX systems:
http://www.brandonhutchinson.com/ctime_atime_mtime.html
Regards,
--
Santi Saez
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file named "suspected" with series of line like these :
{'protocol': 17, 'service': 'BitTorrent KRPC', 'server': '219.78.120.166', 'client_port': 52044, 'client': '10.64.68.44', 'server_port': 8291, 'time': 1226506312L, 'serverhostname': ''}
{'protocol': 17, 'service': 'BitTorrent... (3 Replies)
Discussion started by: rk4k
3 Replies
2. Shell Programming and Scripting
So I have a csv file where the 3rd field is a date string in the format yyyy-mm-dd. I need to change it to mm/dd/yyyy. So each line in the csv file looks like:
StringData,StringData,2009-02-17,12.345,StringData
StringData,StringData,2009-02-16,65.789,StringData
Any idea how I can keep... (5 Replies)
Discussion started by: rpiller
5 Replies
3. Shell Programming and Scripting
I have a comma delimited log file which has the date as MM/DD/YY in the 2nd column, and HH:MM:SS in the 3rd column.
I need to change the date format to YYYY-MM-DD and merge it with the the time HH:MM:SS. How will I got about this?
Sample input
02/27/09,23:52:31
02/27/09,23:52:52... (3 Replies)
Discussion started by: hazno
3 Replies
4. UNIX for Dummies Questions & Answers
I have a list of dates in the following format: mm/dd/yyyy and want to change these to the MySQL standard format: yyyy-mm-dd.
The dates in the original file may or may not be zero padded, so April is sometimes "04" and other times simply "4".
This is what I use to change the format:
sed -i '' -e... (2 Replies)
Discussion started by: figaro
2 Replies
5. Shell Programming and Scripting
Hello!
I have a textfile that look like this:
"83d1:46:2b";"20091008190000";"Rögle BK - Skellefteå";"Swedish"
"d4c:46:21";"20091008190000";"Södertälje - Brynäs";"Swedish"
"d4b:46:2";"20091008190000";"HV 71 - Färjestad";"Swedish"
"838:46:b";"20091010160000";"Skellefteå - HV 71";"Swedish"... (2 Replies)
Discussion started by: condmaster
2 Replies
6. Shell Programming and Scripting
hi there
I have file names in different format as below
triss_20111117_fxcb.csv
triss_fxcb_20111117.csv
xpnl_hypo_reu_miplvdone_11172011.csv
xpnl_hypo_reu_miplvdone_11-17-2011.csv
xpnl_hypo_reu_miplvdone_20111117.csv
xpnl_hypo_reu_miplvdone_20111117xfb.csv... (10 Replies)
Discussion started by: manas_ranjan
10 Replies
7. Shell Programming and Scripting
Hi All,
Below are the unix files taken by the help of ls -lrt
-rw-r--r-- 1 kbehera Domain Users 293 Jul 27 13:33 sand.txt
-rw-r--r-- 1 kbehera Domain Users 4 Jul 27 13:37 sand1.txt
-rw-r--r-- 1 kbehera Domain Users 293 Jul 27 15:30 new_sand.txt
-rw-r--r-- 1 kbehera Domain Users 0 Jul 27... (2 Replies)
Discussion started by: krupasindhu18
2 Replies
8. UNIX for Dummies Questions & Answers
Hi Unix Gurus,
I would like to rename several files in a Unix Directory . The filenames can have more than 1 underscore ( _ ) and the last underscore is always followed by a date in the format mmddyyyy. The Extension of the files can be .txt or .pdf or .xls etc and is case insensitive ie... (1 Reply)
Discussion started by: pchegoor
1 Replies
9. Shell Programming and Scripting
i try to set linux date & time in specific format but it keep giving me error
Example :
date "+%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
or
date +"%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
keep giving me this error :
date: invalid date ‘19-01-2017 00:05:01'
Please use CODE tags... (7 Replies)
Discussion started by: umen
7 Replies
10. UNIX for Beginners Questions & Answers
Hi all,
I have a file as below,
i would like the change the format of the time from "11/7/2019 20:12" to "2019-07-11 20:12:00" in the last coloumn.
any awk solution on this.
Input:
2,0,695016,1961612,497212,5800804,0,0,161,33,7605,12226,23,10,66,0,0,34,11/7/2019 20:10... (4 Replies)
Discussion started by: Raghuram717
4 Replies
LEARN ABOUT DEBIAN
sdl::pixelformat
pods::SDL::PixelFormat(3pm) User Contributed Perl Documentation pods::SDL::PixelFormat(3pm)
NAME
SDL::PixelFormat - Stores surface format information
CATEGORY
Core, Video, Structure
SYNOPSIS
my $surface = SDL::Surface->new( ...
$surface->format; #this returns the PixelFormat object attached to this surface
PixelFormat is only created in a "SDL::Surface". This module only provides getters to the surface's pixelformat. Later on we will provide
setting capability.
DESCRIPTION
An "SDL::PixelFormat " stores surface format information
METHODS
palette
$surface->format->palette;
Returns the "SDL_Palette" and SDL::Palette of the format of the surface.
BitsPerPixel
$surface->format->BitsPerPixel;
The number of bits used to represent each pixel in a surface. Usually 8, 16, 24 or 32. (1 to 7 are not allowed when creating a surface or
open a video mode
BytesPerPixel
$surface->format->BytesPerPixel;
The number of bytes used to represent each pixel in a surface. Usually one to four.
[RGBA]loss
$surface->format->Rloss; #red loss
$surface->format->Bloss; #blue loss
$surface->format->Gloss; #green loss
$surface->format->Aloss; #alpha loss
Precision loss of each color component (2[RGBA]loss)
[RGBA]shift
$surface->format->Rshift; #red shift
$surface->format->Bshift; #blue shift
$surface->format->Gshift; #green shift
$surface->format->Ashift; #alpha shift
Binary left shift of each color component in the pixel value
[RGBA]mask
$surface->format->Rmask; #red mask
$surface->format->Bmask; #blue mask
$surface->format->Gmask; #green mask
$surface->format->Amask; #alpha mask
Binary left shift of each color component in the pixel value
colorkey
$surface->format->colorkey;
Pixel value of transparent pixels.
alpha
$surface->format->alpha;
Overall surface alpha value
SEE ALSO
SDL::Surface
AUTHORS
See "AUTHORS" in SDL.
perl v5.14.2 2012-05-28 pods::SDL::PixelFormat(3pm)