01-02-2014
A best practice is to use the YYYYMMDD format (date '+%Y%m%d') for the date, so that further sorting are made easy.
Not that YYYY is better than YY because retaining only the 2 last digit suppose a loss of information and may lead to ambiguous situations.
Last edited by ctsgnb; 01-02-2014 at 07:18 AM..
This User Gave Thanks to ctsgnb For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm looking to edit a file which contains various data including date.(ddmmyyyy)
I want to sort by date and then count the number of different dates found
Any ideas how to acheive this
Thanks in advance. (2 Replies)
Discussion started by: Mudshark
2 Replies
2. Shell Programming and Scripting
Hello World~
Please Help Me(BASH)
input:
dde,2007.8.25,891
dde,2007.8.23,356
dfe,2007.10.12,341
cba,2005.12.5,342
I wanna know how to sort by the date(2005.12.5)
output:
cba,2005.12.5,342
dde,2007.8.23,356
dde,2007.8.25,891
dfe,2007.10.12,341
Thanks in advance (3 Replies)
Discussion started by: lifegeek
3 Replies
3. UNIX for Dummies Questions & Answers
The problem:
I have a task to give a my boss:
1. the files and directory sizes in human readable form: du -h
2. He also wants me to give him the date stamp on the files and directories. something like ls -R or sort by date
Does anyone have a script that can do this efficiently (I am... (2 Replies)
Discussion started by: obology
2 Replies
4. Programming
hi all,
could anyone help me?
I need to query output by compare dates from 2 table and i'm using a UNION query..and wanted to sort the output by date..
My query like this:
SELECT
TO_CHAR(DATE) DATE1,
INVOICE
FROM ACCOUNT1
WHERE DATE < (to_date('122003','MMYYYY'))
UNION ... (2 Replies)
Discussion started by: kate katherine
2 Replies
5. Shell Programming and Scripting
Hi All,
Please help me to sort the date field which is in the format 2012-02-03 16:09:37.388...
Platform: Red Hat linux
Thanks in advance (2 Replies)
Discussion started by: jesu
2 Replies
6. Shell Programming and Scripting
Hi Experts,
I have a filelist collected from another server , now want to sort the output using date/time stamp filed.
- Filed 6, 7,8 are showing the date/time/stamp.
Here is the input:
#----------------------------------------------------------------------
-rw------- 1 root ... (3 Replies)
Discussion started by: rveri
3 Replies
7. Shell Programming and Scripting
Hi,
I have a file where data is pipe separated.First i want to sort the file content by date . Then i want to pick up the records based on the first column which should be unique and not have duplicates.
NYSE|yyyrrrddd|toronto|isin|ticker|2013-05-15... (2 Replies)
Discussion started by: samrat dutta
2 Replies
8. Shell Programming and Scripting
Hi ,
I have below data inside a file named ref.psv . I want to create a shell script which will do the below 2 points :
(1) sort the file content first based on the latest date which is the last column in the file (actual file its the 175th column)
(2)after sorting the file based on latest date... (3 Replies)
Discussion started by: samrat dutta
3 Replies
9. Shell Programming and Scripting
Hello people,
I am having problem to sort, sed and zero padding of column in csv file.
7th column only.
Input of csv file:
1,2,3,4,5,6,4/1/2010 12:00 AM,8
1,2,3,4,5,6,3/11/2010 9:39 AM,8
1,2,3,4,5,6,5/12/2011 3:43 PM,8
1,2,3,4,5,6,12/20/2009 7:23 PM,8
Output:... (5 Replies)
Discussion started by: sean1357
5 Replies
10. Shell Programming and Scripting
nawk '$1=="Date" {d=$(NF-2);next} $1=="Queue" {q=$NF;next} $1=="Forms"{print q, $NF, d}' OFS='|' printfile.log
I have this script working. Please let me know how to sort by Queue and then Date. (4 Replies)
Discussion started by: Daniel Gate
4 Replies
LEARN ABOUT SUSE
vfs_shadow_copy
VFS_SHADOW_COPY(8) System Administration tools VFS_SHADOW_COPY(8)
NAME
vfs_shadow_copy - Make a Samba share read only for a specified time period
SYNOPSIS
vfs objects = shadow_copy
DESCRIPTION
This VFS module is part of the samba(7) suite.
The vfs_shadow_copy VFS module functionality that is similar to Microsoft Shadow Copy services. When setup properly, this module allows
Microsoft Shadow Copy clients to browse "shadow copies" on Samba shares.
This module is stackable.
CONFIGURATION
vfs_shadow_copy relies on a filesystem snapshot implementation. Many common filesystems have native support for this.
Filesystem snapshots must be mounted on specially named directories in order to be recognized by vfs_shadow_copy. The snapshot mount points
must be immediate children of a the directory being shared.
The snapshot naming convention is @GMT-YYYY.MM.DD-hh.mm.ss, where:
o YYYY is the 4 digit year
o MM is the 2 digit month
o DD is the 2 digit day
o hh is the 2 digit hour
o mm is the 2 digit minute
o ss is the 2 digit second.
The vfs_shadow_copy snapshot naming convention can be produced with the following date(1) command:
TZ=GMT date +@GMT-%Y.%m.%d-%H.%M.%S
EXAMPLES
Add shadow copy support to user home directories:
[homes]
vfs objects = shadow_copy
CAVEATS
This is not a backup, archival, or version control solution.
With Samba or Windows servers, vfs_shadow_copy is designed to be an end-user tool only. It does not replace or enhance your backup and
archival solutions and should in no way be considered as such. Additionally, if you need version control, implement a version control
system.
VERSION
This man page is correct for version 3.0.25 of the Samba suite.
AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open
Source project similar to the way the Linux kernel is developed.
Samba 3.5 06/18/2010 VFS_SHADOW_COPY(8)