Script to rename file that was generated today and which starts with date
hello,
can someone please suggest a script to rename a file that was generated today and filename that being generated daily starts with date, its a xml file.
here is example.
this finename should be renamed to this format.
renamedfeed_20130529.xml
I'm trying to rename the last generated file in a given directory using a makefile.
If I type 'make build' the 'build' target produces a file (ie: text_001.txt). It automatically generates them sequentially, so I don't have control over the name. I can't say that it will always be text_001.txt.... (2 Replies)
Hi,
Can anyone plz share their experience with -
Building shell script to append the file with date in following format-
Filename_MMDDYYYY.txt
Thanks in advance (2 Replies)
Hi I am very new to scripting,
Can someone show me how to (in unix shell script) compare the system's date with a date in a file. The requirement is to somehow open this file (which will only have a date in it) and compare it with today's date. If they are equal execute a procedure below but if... (4 Replies)
I am a newbie to scripting.
I need a korn shell script to copy log files of current day to archive folder and rename with current days date stamp.
I would really appreciate your help.
File structure is as follows. Everyday files get overwritten, so I need copy to a archive directory and... (3 Replies)
Hi Guys,
I was working some time ago n was in need to calculate date 30/31 days from today including Feb (Leap yr stuff). Today date is variable depending on day of execution of script. I tried searching but was not able to get exactly what I needed....So at that I time I implemented by my own... (3 Replies)
I would like to find the Files which are generated today in the current directory:
I use the commad ls -lrt * | egrep " `date "+%b"` * `date "+%d"`
to acheive this. Is there any better way to acquire the same.
Multiple answers will be great. Thanks (3 Replies)
Hi
I have file with number status and date1 and date1 field,
want add a column today between column date1 and date2.
file1.txt
number status date1 date2
===== ==== === =====
34567 open 27/06/13 28/06/13
45678 open 27/06/13 28/06/13
43567 open 27/06/13 28/06/13 ... (1 Reply)
This is on a CentOS box, I have two scripts that need to run in order.
I want to write a shell script that calls the first script, lets it run and then terminates it after a certain number of hours (that I specify of course), and then calls the second script (they can't run simultaneously) which... (3 Replies)
Hi Community!
Following on from this code in another thread:
#!/bin/bash
file_string=`/bin/cat date.txt | /usr/bin/awk '{print $5,$4,$7,$6,$8}'`
file_date=`/bin/date -d "$file_string"`
file_epoch=`/bin/date -d "$file_string" +%s`
now_epoch=`/bin/date +%s`
if
then
#let... (2 Replies)
Discussion started by: Greenage
2 Replies
LEARN ABOUT OPENSOLARIS
gvfs-rename
gvfs-rename(1) User Commands gvfs-rename(1)NAME
gvfs-rename - change the name of a file or directory using the VFS system
SYNOPSIS
gvfs-rename source-URI new-name
DESCRIPTION
gvfs-rename changes the name of a file or directory, using the virtual file system.
OPERANDS
The following operands are supported:
source-URI Specifies the source file location in standard URI format.
new-name Specifies the new name for file or directory.
EXAMPLES
Example 1: Rename a Local HTML File
example%
gvfs-rename file:///home/user/index.html file:///home/user/index.html.old
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables: NLSPATH.
EXIT STATUS
The exit value 0 is returned regardless of success or failure.
FILES
The following files are used by this application:
/usr/bin/gvfs-rename Executable to rename a file using the GVFS library
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWgnome-gvfs |
+-----------------------------+-----------------------------+
|Interface stability |Volatile |
+-----------------------------+-----------------------------+
SEE ALSO gvfs-cat(1), gvfs-copy(1), gvfs-move(1), gvfs-info(1), gvfs-less(1), gvfs-ls(1), gvfs-mkdir(1)gvfs-monitor-dir(1), gvfs-monitor-file(1),
gvfs-mount(1), gvfs-copy(1), gvfs-open(1), gvfs-rm(1), gvfs-save(1), gvfs-trash(1), gvfs-tree(1), attributes(5), environ(5)NOTES
Written by Alvaro Lopez Ortega, Sun Microsystems Inc., 2008.
SunOS 5.11 30 May 2008 gvfs-rename(1)