12-04-2012
Amend File Without Changing Timestamp
Hi,
Is it possible to amend a file without changing the last modified date?
If it is, how do you do it?
If it's not, is there a way to create an empty file with the same timestamp as another file?
I know you can use touch -t yyyymmddhhmm.ss filename but, I would want the file to have the exact same timestamp as another file.
Any help would be greatly appreciated.
Thanks
****EDIT****
Sorry, I forgot to mention. I'm trying to script using bash.
10 More Discussions You Might Find Interesting
1. Solaris
How can I change teh timestamp of a file (1 Reply)
Discussion started by: krishan
1 Replies
2. Shell Programming and Scripting
Hi,
I'm trying to write a command that backs up certain files into my current directory and adds a prefix to the backed up file name. I realise this can be done in a script by specifying each individual file but would like to know if it can be done on one line and made an alias.
I have the... (5 Replies)
Discussion started by: m223464
5 Replies
3. Solaris
Hi guys,
I'm fidling around Partition space on SMC
and on changing partition size, or assiging an unused partition to "usr", or even trying to alter the disk layout I get:
Attempted Format of Partition /dev/dsk/c1t0d0s3 failed with unexpected CIM error:
CIM_ERR_FAILED:CIM_ERR_FAILED:... (2 Replies)
Discussion started by: drchris
2 Replies
4. Shell Programming and Scripting
Hi all, below is my current scriptftp -n << FTPCTRL
open $my_ip
user $my_user $my_pass
ascii
prompt off
lcd $myDIR
cd $ftp_cd
$OPS $myfile
FTPCTRLI'd like to amend it to sftp mode. Please advise the correct step.I consulted the man pages of sftp and I suppose I should be using the... (1 Reply)
Discussion started by: new2ss
1 Replies
5. UNIX for Advanced & Expert Users
Hi,
Please could someone advise on the following if possible. I have built a unix server, and was given the wrong hostname. I need to amend the hostname to the correct name. And I don't want to rebuild the server again.
I've tried the following to do change :
hostname DTCT-TD3FIXI01A... (3 Replies)
Discussion started by: venhart
3 Replies
6. Shell Programming and Scripting
2009/03/30 08:11:34.553 DFP
2009/03/30 08:11:36.861 PLO
I want it to be
2009/03/30 09:11:34.553 DFP
2009/03/30 09:11:36.861 PLO
and
2009/03/30 23:11:34.553 DFP
2009/03/30 23:11:36.861 PLO
to be
2009/03/30 00:11:34.553 DFP
2009/03/30 00:11:36.861 PLO
Can we use sed or... (4 Replies)
Discussion started by: lalelle
4 Replies
7. UNIX for Advanced & Expert Users
Hi All
I want to change the date timestamp for the log file but to do it within crontab
I've tried the following..
40 11 * * * /data/dart/dc65.1/bin/adstats.sh > /data/dart/dc65.1/bin/adstats_`date'+%d:%m-%H.%M.%S'`.log 2>&1
But I only get adstats_
Any ideas?
Thanking you all... (4 Replies)
Discussion started by: Zak
4 Replies
8. Shell Programming and Scripting
Hi,
I've a file in the following format
1999-APR-8 17:31:06 1500 3 45
1999-APR-8 17:31:15 1500 3 45
1999-APR-8 17:31:25 1500 3 45
1999-APR-8 17:31:30 1500 3 45
1999-APR-8 17:31:55 1500 3 45
1999-APR-8 17:32:06 1500 3 ... (1 Reply)
Discussion started by: vaibhavkorde
1 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
I am new to unix programming. I am trying for a requirement and the requirement goes like this.....
I have a test folder. Which tracks log files. After certain time, the log file is getting overwritten by another file (randomly as the time interval is not periodic). I need to preserve... (2 Replies)
Discussion started by: mailsara
2 Replies
10. Shell Programming and Scripting
Hi Friends,
I have the following logfile. Currently time in india is 07/31/2014 12:33:34 and i have the following content in logfile. I want to display only those entries which contain string 'Exception' within last 3 hours. In this case, it would be the last line only
I can get the... (12 Replies)
Discussion started by: srkmish
12 Replies
LEARN ABOUT DEBIAN
ledgersmb::dbobject::asset_report
LedgerSMB::DBObject::Asset_Report(3pm) User Contributed Perl Documentation LedgerSMB::DBObject::Asset_Report(3pm)
NAME
LedgerSMB::DBObject::Asset_Report - LedgerSMB Base Class for Asset Reports
SYNOPSIS
This library contains the base utility functions for creating, saving, and retrieving depreciation categories of asset depreciation and
disposal reports.
STANDARD PROPERTIES
id int
Integer id of asset report
report_date date
Effective date of report
gl_id bigint
ID of GL transaction if applicable and approved.
asset_class bigint
ID of asset class for the report the assets are
report_class int
Integer of the report class desired.
entered_by bigint
Integer id of the individual who entered the report
approved_by bigint
Integer id of the individual who approved the report
entered_at timestamp
Timestamp the report was created
approved_at timestamp
Timestamp the report was approved
depreciated_qty
Number of units (production or time) depreciated
dont_approve bool
If true, do not approve, ever.
submitted bool
If true, submitted for approval
METHODS
save
Uses standard properties
Saves report to the database. Sets ID.
For each asset to be added to the report, we see:
for each row, id_$row contains the asset id for that row. Let this be $id
if asset_$id, the asset is added. Each asset also has: amount_$id dm_$id percent_$id
get Gets report from the database.
get_nbv
Returns line items for the Net Book Value report.
generate
Properties used:
* report_id int: Report to enter the transactions into, * accum_account_id int: ID for accumulated depreciation.
approve
Properties used:
id
For depreciation accounts, expense_acct must be set.
For disposal accounts, gain_acct and loss_acct must be set.
Approves the referenced transaction and creates a GL draft (which must then be approved.
search
Searches for matching asset reports for review and approval.
Search criteria in properties:
* start_date date * end_date date * asset_class int * approved bool * entered_by int
Start and end dates specify the date range (inclusive) and all other matches are exact. Undefs match all records.
get_metadata
Sets the following properties:
* asset_classes: List of asset classes * exp_accounts: List of expense accounts * gain_accounts: List of gain accounts *
loss_accounts: list of loss accounts * disp_methods: List of disposal methods
Copyright (C) 2010, The LedgerSMB core team.
This file is licensed under the Gnu General Public License version 2, or at your option any later version. A copy of the license should
have been included with your software.
perl v5.14.2 2012-03-25 LedgerSMB::DBObject::Asset_Report(3pm)