Sponsored Content
Top Forums Shell Programming and Scripting Needed touch command to create a file in the following format Post 302745857 by hemanthsaikumar on Tuesday 18th of December 2012 08:30:34 AM
Old 12-18-2012
Needed touch command to create a file in the following format

needed touch command to create a file in the following format


touch a_yyyymmdd_hhmmss
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

command 'touch -c file/dir'

Dear expert, what is this command touch -c filename using for? I find if execute and filename is existed, it update the date to now. If the filename is not exeisted, it don't create the file.. so what is this command using for? Thank a lot! (1 Reply)
Discussion started by: zp523444
1 Replies

2. UNIX for Dummies Questions & Answers

How to create concatenate a file in tab format

Hi, Do you know given a file which is SED at the same time, how to read it and AWK it in tabs format. Means:- I have an input file which is (at the same time perform sed):- 1 2 3 4 5 6 7 I would like to print out in tab format which is:- 1 2 3 4 5 6 7 .... (12 Replies)
Discussion started by: ahjiefreak
12 Replies

3. Shell Programming and Scripting

Help to Create this file format structure

This data comes form the table and exported into the file in this format File1 Format weboffercode1,sourcecode1,1,1,1,1,1,1 weboffercode1,sourcecode2,1,1,1,1,1,1 weboffercode1,sourcecode1,1,1,1,1,1,1 weboffercode1,sourcecode3,1,1,1,1,1,1 weboffercode1,sourcecode3,1,1,1,1,1,1 ... (4 Replies)
Discussion started by: enigma_83
4 Replies

4. Shell Programming and Scripting

How to format or create a matrix report from file

Dear Unix champs, I have a input file as attached, i would like to create an report from the file as below FileType | EQUENS0001 | EQUENS0002 | EQUENS1100 | EQUENS0003 --------+-------------------------------------------------------- Msg No |... (3 Replies)
Discussion started by: manas_ranjan
3 Replies

5. UNIX for Advanced & Expert Users

to create format file for bcp in

I want to create the format file for bcp in a file to the table. My Versions are: Unix: Sun OS, DB: Sybase. How can i create the format file. Is there any way to create the format by bcp command or some system sp. Please help. (3 Replies)
Discussion started by: Arunprasad
3 Replies

6. Shell Programming and Scripting

Conversion of below Tabs Tex file into CSV format file : shell script needed

Request if some one could provide me shell script that converts the below "input file" to "CSV format file" given Name Domain Contact Phone Email Location ----------------------- ------------------------------------------------ ------- ----- ---------------------------------... (7 Replies)
Discussion started by: sreenath1037
7 Replies

7. Shell Programming and Scripting

Create a trigger file using touch

Hi, I need to create a trigger file named "start" at 4 pm daily . Once this file is created , another process would be initiated. How do i do it using touch command in unix ? My script that should have touch command shall be present in a dir /app/user/script while the trigger file should be... (2 Replies)
Discussion started by: samrat dutta
2 Replies

8. UNIX for Dummies Questions & Answers

Using touch to create a file

I have noticed that the following command works touch subtext_geopdf_to_.x However this one does not touch subtext_/geopdf/_to_/.x How can I create such a file without making it think I supplied a path? (2 Replies)
Discussion started by: kristinu
2 Replies

9. Shell Programming and Scripting

Command / Script to create touch file in destination server

Hello Team, Is there any Linux command / script available so that, I could create a simple 0 byte file in destination server by issuing the command from source server. If yes, Could you please let me know the possible solutions. in other words I just want to create a touch file in my home... (1 Reply)
Discussion started by: madhuraju
1 Replies

10. UNIX for Beginners Questions & Answers

Create movie from jpg (or other picture format) file

hi linux expert is there any program for create movie file from pictures file (like jpg)? Many Thanks samad (1 Reply)
Discussion started by: abdossamad2003
1 Replies
lockfile-progs(1)						 Lockfile programs						 lockfile-progs(1)

NAME
lockfile-progs - command-line programs to safely lock and unlock files and mailboxes (via liblockfile). SYNOPSIS
mail-lock [--use-pid] [--retry retry-count] mail-unlock mail-touchlock [--oneshot] lockfile-create [--use-pid] [--retry retry-count] [--lock-name] filename lockfile-remove [--lock-name] filename lockfile-touch [--oneshot] [--lock-name] filename lockfile-check [--use-pid] [--lock-name] filename DESCRIPTION
Lockfile-progs provides a set a programs that can be used to lock and unlock mailboxes and files safely (via liblockfile): mail-lock - lock the current user's mailbox mail-unlock - unlock the current user's mailbox mail-touchlock - touch the lock on the current user's mailbox lockfile-create - lock a given file lockfile-remove - remove the lock on a given file lockfile-touch - touch the lock on a given file lockfile-check - check the lock on a given file By default, the filename argument refers to the name of the file to be locked, and the name of the lockfile will be filename .lock. How- ever, if the --lock-name argument is specified, then filename will be taken as the name of the lockfile itself. Each of the mail locking commands attempts to lock /var/spool/mail/<user>, where <user> is the name associated with the effective user ID, as determined by via geteuid(2). Once a file is locked, the lock must be touched at least once every five minutes or the lock will be considered stale, and subsequent lock attempts will succeed. Also see the --use-pid option and the lockfile_create(3) manpage. The lockfile-check command tests whether or not a valid lock already exists. OPTIONS
-q, --quiet Suppress any output. Success or failure will only be indicated by the exit status. -v, --verbose Enable diagnostic output. -l, --lock-name Do not append .lock to the filename. This option applies to lockfile-create, lockfile-remove, lockfile-touch, or lockfile-check. -p, --use-pid Write the current process id (PID) to the lockfile whenever a lockfile is created, and use that pid when checking a lock's validity. See the lockfile_create(3) manpage for more information. This option applies to lockfile-create, lockfile-remove, lockfile-touch, and lockfile-check. -o, --oneshot Touch the lock and exit immediately. This option applies to lockfile-touch and mail-touchlock. When not provided, these commands will run forever, touching the lock once every minute until killed. -r retry-count, --retry retry-count Try to lock filename retry-count times before giving up. Each attempt will be delayed a bit longer than the last (in 5 second incre- ments) until reaching a maximum delay of one minute between retries. If retry-count is unspecified, the default is 9 which will give up after 180 seconds (3 minutes) if all 9 lock attempts fail. EXAMPLES
Locking a file during a lengthy process: lockfile-create /some/file lockfile-touch /some/file & # Save the PID of the lockfile-touch process BADGER="$!" do-something-important-with /some/file kill "${BADGER}" lockfile-remove /some/file EXIT STATUS
0 For lockfile-check this indicates that a valid lock exists, otherwise it just indicates successful program execution. Not 0 For lockfile-check a non-zero exit status indicates that the specified lock does not exist or is not valid. For other programs it indicates that some problem was encountered. SEE ALSO
maillock(3) touchlock(3) mailunlock(3) lockfile_create(3) lockfile_remove(3) lockfile_touch(3) lockfile_check(3) AUTHOR
Written by Rob Browning <rlb@defaultvalue.org> 0.1.12 2008-02-10 lockfile-progs(1)
All times are GMT -4. The time now is 12:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy