File Name as Unique


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting File Name as Unique
# 1  
Old 02-11-2009
Bug File Name as Unique

Hi all,
Since I need to maintain the file name with time stamp as unique in unix, i need to write script.
Is there any way to capture the milli/micro seconds of unix system.
Please reply me.
# 2  
Old 02-11-2009
It may help you:

date '+DATE: %m%d%y%H%M%S'
DATE: 021109024340
# 3  
Old 02-11-2009
For getting nanoseconds:
date '+%N'

refer man page of date command for more details.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

sed awk: split a large file to unique file names

Dear Users, Appreciate your help if you could help me with splitting a large file > 1 million lines with sed or awk. below is the text in the file input file.txt scaffold1 928 929 C/T + scaffold1 942 943 G/C + scaffold1 959 960 C/T +... (6 Replies)
Discussion started by: kapr0001
6 Replies

2. UNIX for Dummies Questions & Answers

Print unique lines without sort or unique

I would like to print unique lines without sort or unique. Unfortunately the server I am working on does not have sort or unique. I have not been able to contact the administrator of the server to ask him to add it for several weeks. (7 Replies)
Discussion started by: cokedude
7 Replies

3. Shell Programming and Scripting

Change unique file names into new unique filenames

I have 84 files with the following names splitseqs.1, spliseqs.2 etc. and I want to change the .number to a unique filename. E.g. change splitseqs.1 into splitseqs.7114_1#24 and change spliseqs.2 into splitseqs.7067_2#4 So all the current file names are unique, so are the new file names.... (1 Reply)
Discussion started by: avonm
1 Replies

4. Shell Programming and Scripting

Create shell script to extract unique information from one file to a new file.

Hi to all, I got this content/pattern from file http.log.20110808.gz mail1 httpd: Account Notice: close igchung@abc.com 2011/8/7 7:37:36 0:00:03 0 0 1 mail1 httpd: Account Information: login sastria9@abc.com proxy sid=gFp4DLm5HnU mail1 httpd: Account Notice: close sastria9@abc.com... (16 Replies)
Discussion started by: Mr_47
16 Replies

5. Shell Programming and Scripting

Unique account id file

I have a fixed length file (each record of 288 characters). The unique id in each record is account_id which is from position 1:30 My file is having duplicate account ids ( records having same account id). However the information except account_id can be different. ( Most of the records... (5 Replies)
Discussion started by: varunrbs
5 Replies

6. Shell Programming and Scripting

Unique File Differences

I have the 2 files File 1 ABC,1239800 BCED,890000 ABCKJK,66767 File 2 GUHJC,1239800 ABC,1239800 TYIO,5636 The thing is the no of values in file can exceed example ABC,1239800,4545465,AHHAH so i need to find those values in file 1 which do not match in File 2 so i should get... (7 Replies)
Discussion started by: dinjo_jo
7 Replies

7. UNIX for Dummies Questions & Answers

Get List of Unique File Names

I have a large directory of web pages. I am doing a search through the web pages using grep and would like to get a list of unique file names of search results. The following command works fine to give me a list of file names where term appears: grep -l term *.html However, since these are... (3 Replies)
Discussion started by: rjulich
3 Replies

8. Shell Programming and Scripting

how many unique lines in a file

I have a file, test.txt with approx 12,000 lines. Each line is a single word that looks like a hex address. There are many repeats. Over half of the lines are the same. I want to count how many UNIQUE lines there are. #>more test.txt 0x123456 0x56AF23 0x99ABC1 0x123456 0x123456 0x99ABC1... (3 Replies)
Discussion started by: ajp7701
3 Replies

9. Shell Programming and Scripting

get part of file with unique & non-unique string

I have an archive file that holds a batch of statements. I would like to be able to extract a certain statement based on the unique customer # (ie. 123456). The end for each statement is noted by "ENDSTM". I can find the line number for the beginning of the statement section with sed. ... (5 Replies)
Discussion started by: andrewsc
5 Replies

10. Shell Programming and Scripting

Getting Unique values in a file

Hi, I have a file like this: Some_String_Here 123 123 123 321 321 321 3432 3221 557 886 321 321 I would like to find only the unique values in the files and get the following output: Some_String_Here 123 321 3432 3221 557 886 I am trying to get this done using awk. Can someone please... (5 Replies)
Discussion started by: Legend986
5 Replies
Login or Register to Ask a Question