Hi Guys,
I need to script the renaming of files as followins:
files:
firstjd
secondjo
thirdjv
My script needs to insert the date/time infront of the last 2 characters of the filenames above, any ideas greatly received :)
the letters before the last 2 characters could change, I'm only... (7 Replies)
Hi,
I have 24 .dat files something like below. The file name starts with “abc” followed by two digit month and two digit year. Is there a way to grab the month and year from each filename and append it to the end of each line. Once this is done I want to combine all the files into file... (1 Reply)
Hi there,
I'm using terminal on mac and using the ls -l command to list all the files in a directory. However, I only want to display the date and time stamp of each file rather than permissions, owner, group etc...
Is this possible?
Many thanks in advance
Dave (2 Replies)
:confused:
Hi, I posted here before for adding up of datafile name each time, here is an example:
#!/bin/bash
cutdfname="data11.dbf"
newname=$(echo "${cutdfname}" |tr "" "" |tr "#_@-" "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" |tr -s "x")
num=$(echo $newname |cut -d"." -f1|awk... (5 Replies)
Hi,
When we use "ls -l" we are getting like below,
-rw-r--r-- 1 mdskl mds 4161479 Apr 12 14:57 VTTF2008.20080412145748.cc
But i need only modified time and filename only like below,
Apr 12 14:57 VTTF3008.20080412145748.cc
Thanks-:)
Senthil (4 Replies)
Hi guys,
I know that this topic has been discuss numerous times, and I have search the net and this forum for it.
However, non able to address the problem I faced so far.
I am on Solaris Platform and unable to install additional packages like the GNU date and gawk to make use of their... (5 Replies)
Hi,
I want to add some hours and minutes to the current date. For example, if the current date is "July 16, 2012 15:20", i want to add 5 hours 30 minutes to "July 16, 2012 00:00" not to "July 16, 2012 15:20". Please help.
Thanks! (4 Replies)
I'm looking for a way to have the "date" command output the date in a specific format.
I'm not familiar with the different ways to use the date command at all. i read up on it, but i dont get how to manipulate it.
i know that i can get the date format to give me a format like:
2012-10-13... (6 Replies)
I needed some help in adding a duration (in seconds) to a start time (in hhmmss format) and a start date (in mmddyy format) in order to get an end date and end time. The concept of a leap year is also to be considered while incrementing the day. The code/ function that I have formed so far is as... (3 Replies)
Hi,
I'm totally new in sell script and working with a shell code. I want to extract the date and time from the filenames. The filenames are different but all of them begins with WI_ SCOPE_:
WI_SCOPE_DATA_CHANGE_2017-09-12_15-30-40.txt
WI_SCOPE_BACK_COMPLETE_QUEUE_2017-09-12_15-31-40.txt... (5 Replies)
Discussion started by: Home
5 Replies
LEARN ABOUT MINIX
fwtmp
fwtmp(1M) System Administration Commands fwtmp(1M)NAME
fwtmp, wtmpfix - manipulate connect accounting records
SYNOPSIS
/usr/lib/acct/fwtmp [-ic]
/usr/lib/acct/wtmpfix [file...]
DESCRIPTION
fwtmp reads from the standard input and writes to the standard output, converting binary records of the type found in /var/adm/wtmpx to
formatted ASCII records. The ASCII version is useful when it is necessary to edit bad records.
wtmpfix examines the standard input or named files in utmpx format, corrects the time/date stamps to make the entries consistent, and
writes to the standard output. A hyphen (-) can be used in place of file to indicate the standard input. If time/date corrections are not
performed, acctcon(1M) will fault when it encounters certain date-change records.
Each time the date is set, a pair of date change records are written to /var/adm/wtmpx. The first record is the old date denoted by the
string "old time" placed in the line field and the flag OLD_TIME placed in the type field of the utmpx structure. The second record speci-
fies the new date and is denoted by the string new time placed in the line field and the flag NEW_TIME placed in the type field. wtmpfix
uses these records to synchronize all time stamps in the file.
In addition to correcting time/date stamps, wtmpfix will check the validity of the name field to ensure that it consists solely of alphanu-
meric characters or spaces. If it encounters a name that is considered invalid, it will change the login name to INVALID and write a diag-
nostic to the standard error. In this way, wtmpfix reduces the chance that acctcon will fail when processing connect accounting records.
OPTIONS -ic Denotes that input is in ASCII form, and output is to be written in binary form.
FILES
/var/adm/wtmpx history of user access and administration information
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWaccu |
+-----------------------------+-----------------------------+
SEE ALSO acctcom(1), ed(1), acct(1M), acctcms(1M), acctcon(1M), acctmerg(1M), acctprc(1M), acctsh(1M), runacct(1M), acct(2), acct.h(3HEAD),
utmpx(4), attributes(5)
System Administration Guide: Basic Administration
SunOS 5.10 22 Feb 1999 fwtmp(1M)