CentOS 5 :: Get File Date On Other Server?

Aug 16, 2011

Is it possible to get the last modified date for one file on a remote server from command line?

View 4 Replies


ADVERTISEMENT

Programming :: Keep Original Mod Date Of A File And 'date' It Back To Same File?

Jul 12, 2010

I would really like to preserve a file's original modified date and pass it back to the file as the same attribute after a script has worked on it. I get a lot of JPEG files from different places on the Net which I either turn around and upload or burn to disk, and having the "original" date of either download or last mod in a graphics app would be for me, in the long run, a lot more helpful when deciding, for instance, which files to "recycle" or pass on backing up more than once.I've tried doing this on my own every now and then. Where I run into problems is that it appears "stat" and "date" use different formats for date information, and I can't seem to puzzle out how to "translate" one to the other satisfactorily for the latter command.

Just to give an example:
stat foo.jpg |grep Modify gives me
Modify: 2010-07-12 06:28:56.890625000 -0400

Passing that string as-is to date foo.jpg, I get the errordate: unknown option -- 0 and the usual semi-courteous suggestion to Try 'date --help' for more information.Somehow my TexInfo database got screwed up somewhere along the line and info dategives me the short article on date input formats, not the full documentation for the command

View 4 Replies View Related

CentOS 5 Server :: Sync Time With NTP But NOT The Date Possible?

Apr 11, 2011

I am trying to sync the time on my Centos 5 box, but I do not want to sync the date. All of our servers need to have the clocks synced, but one system needs to have the date set to the previous day.

View 6 Replies View Related

General :: Use Date With Touch To Create New File With Date Based Name?

Mar 12, 2010

I am using CRON to create a new, blank file, every minute, in a specific location on my web server. After web searching, and reading man pages, I get the impression that the following command is supposed to work:touch /home/mydomain/var/folder/attachments/`date +%H%M`.txtThis should give me a new file with a file name that is the current hour and minute.However, when executed, the CRON mailer reports:touch /home/mydomain/var/folder/attachments/`date +/bin/sh: -c: line 0: unexpected EOF while looking for matching /bin/sh: -c: line 1: syntax error: unexpected end of fileSo, it looks like shell is seeing the plus (+) sign as an EOFObviously, nothing get created.What would be the easiest, single line command to create an empty file, at a given location, with a time based file name

View 5 Replies View Related

General :: Load The Local .csv File Into Mysql Server The Date Format Varies?

May 25, 2010

When i load the local .csv file into mysql server the date format varies.Its mis matching.How to solve and match this.

View 1 Replies View Related

Server :: Find The List Of File Being Tagged By User Jack Starting From A Given Date?

Mar 27, 2011

I need to find the list of file being tagged by user jack starting from a given date.Eg:Tag Name:lcc_dev_p1User: jackDate: >= 2011-03-02can some done tell me what is the cvs command for this.Should the below command give the correct outputcvs log -R -S -N -rlcc_dev_p1 -d">=2011-03-13" -wjack > /tmp/output.txt

View 1 Replies View Related

Ubuntu Multimedia :: Digikam - Renaming On Import - "Create Date" Versus "File Modification Date"

Jan 24, 2011

I just switched from a basic digital camera to a more advanced one that stores both Jpeg and Raw (.Nef - it's a Nikon) files for me.When importing files in Digikam, I rename the files so that they start with Date and Time. Example: 20110121-223748.JPG for a photo taken on Jan 21st 2011 at 22:37:48.I was a bit surprised when importing both the JPEG and the Raw version of the same photo, that the filename is different by a few seconds (no constant offset, sometimes they are the same):

20110121-223748.JPG
20110121-223750.NEF

I did some "research" by looking at the exif data of both files (using "exiftool 20110121-223748.JPG" from the command line). Here is what I got back

(amongst other data):20110121-223748.JPG
File Modification Date/Time : 2011:01:21 22:37:48+01:00
Modify Date : 2011:01:21 22:37:48
Date/Time Original : 2011:01:21 22:37:48

[code]....

So it seems that Digikam is using the "File Modification Date/Time" (different in the Jpeg's and Raw's of my camera) rather than the "Create Date" (the same for both Jpeg and Raw). (The few seconds difference in "File Modification Date/Time" between the two versions of the same photo is probably due to the time that my camera needs to write away the data on the SD memory card. I guess.) Is there a way to have Digikam use the Create Date? (Or the Date/Time Original?)

PS: I'm on Ubuntu 10.04LTS, using DigiKam 1.2.0

View 1 Replies View Related

Server :: Log The Output Of "date" To A Particular File On Local System And NTP

Apr 6, 2011

Let's suppose there are "n" number of servers in a Linux cluster / network environment. We want to make sure that "date" on all those servers are in sync. How can we log the output of "date" to a particular file (log file, let's name it /tmp/date.log on our local system from where we are executing our command or script) run on every server one by one so that we can have a log of all the servers and their corresponding date vales in the following format:

[Code]....

View 5 Replies View Related

CentOS 5 :: Change Only Date And Keep Time In Centos?

Jan 2, 2010

I want to change only the date of my Centos server but keep the time as it is. Which command to use?

Example:

Sat Jan 2 22:04:39 ICT 2010

I want to change with a command to:

Sun Dec 12 22:04:00 ICT 2010

but the command need only works on the date, the time need no to be modified. How can I do it?

View 2 Replies View Related

General :: Parsing File Dates - Get The Date Of The Last Time A File Was Modified ?

Jan 11, 2010

I need to get the modified date on a file in linux to use in a script.I tried using 'ls -l' on the file, but this caused problems when the date turned from a single digit into a double. The reason for the problem was because I was parsing the result string on spaces.How can I get the date of the last time a file was modified so I can use it in a script? For example, if a file was modified on 1/11/2010, I need the 11.

View 2 Replies View Related

CentOS 5 Server :: Hosts File And Resolv.conf Conflict CentOS 5.5?

Apr 11, 2011

I am running an application that requires use of my /etc/hosts file. In it, I have my machine name and its LAN ip address. The program creates a service on a specific port, then attempts to connect to it based on the host name. So my hosts file has to be correct.I added the nameservers to resolv.conf and now my application will not run. My guess is that the computer is checking the name servers first, timing out then checking the hosts file.Is there a way I can tell the system to check the hosts file first, then DNS. I thought it should behave that way by default, but it does not appear to.

View 1 Replies View Related

Server :: Custom CentOS 5 Install With Ks.cfg File And CentOS All In One

Jan 14, 2010

What i want to be able to do is create a custom kickstart for my centOS 5 server. I want to create a bootable cd that I can pop in my server and basically walk away for 45 minutes and I come back and its fully installed. All the directions I have read so far tell me that I have to create a seperate ks.cfg and then I need my original centos cd to get it booted. Then the cd will ask for where the ks.cfg file is and I have to type the location. I just want to pop the CD in and type in linux_clean or something and have it perform a custom install based on the information and specification in my ks.cfg. How can I go about doing this?

View 1 Replies View Related

CentOS 5 Server :: Apachewithdocx - Microsoft Documents Wants To Open The File Like A Zip-file Not As Word Document

Jul 13, 2010

I've a webserver with a lot of documentary to serve. Some of the users have problems with the new microsoft documents like docx. Internet explorer 7 want to open the file like a zip-file not as word document. I've googelt around and found a solution that didn't work for me: [URL] I've added at /etc/mime.types

[Code]....

After a restart of httpd , nothing chance, always the same failure with internet explorer 7.

View 4 Replies View Related

CentOS 5 Server :: Want To Know File Handles / File Names At NFS Client

Nov 16, 2010

In case that NFS client of fedora is set to cache nfs file handle, where is the cache stored such as /var/lib/nfs?If it's stored in memory instead of directory tree, what command can I know the combination of file names and file handles with?OS in my test environment: Fedora Core 6

View 2 Replies View Related

Server :: CentOS /Samba Server- XP Windows Client File Sharing?

Nov 3, 2009

I have a CentOS + Samba server and Windows XP client machines. Users, passwords and permissions are entered on the server machine.users and passwords ( same as on the server ) are entered in the XP client machine.When attempting to access a public file on the server using a XP client machine and the IP address of my server, I am asked a user name and password and none of the already entered seem to work. I cannot access the server file (prompted again and again to enter user name and password). What did i miss

View 7 Replies View Related

CentOS 5 Server :: NFS Performance With Files Not Yet Cached By The Server File System?

Feb 25, 2009

I have a weird performance issue with a centos 5 running a nfs server and a rh8 client. I think the fact that it is rh8 client should be downplayed. It is just that with rh8 client the performance degradation seems more clear. See test details below OS in server is Centos 5 x86_64 kernel 2.6.18-92.1.22.el5

1Gb connection between machines File to test over NFS is a 1GB file. First of all I wanted to measure how the network alone performs while using NFS. So in the server side I run a "cat" command on the 1GB file to /dev/null. Please note that the disk read speed is about 98MBs. At this point the file system has the 1GB file cached in memory. In the client side a "cat" on the same file gives me a speed of about 113MBs. It seems then that the bottleneck in this instance is the network and it is very close to nominal speed. So the network performance is really good. (BTW I know that the server got that file from cache because a vmstat or iostat shows no disk activity.)

The second test is reading from disk with no caching involve. In the server I flushed the 1GB file from the memory. For instance by reading another 5GB file and I repeat the same thing as above in the client (a cat on the 1GB file). Now, the server has to go to disk.(vmstat or iostat shows the disk activity). However the performance, now, is about 20MBs, I was expecting something closer so 90MBs. (since the reading speed in the server in the first test showed 98MBs).

This second test was repeated for ext2, ext3, xfs with no significant differences. A similar test using a RH8 NFS server and client gets me close to 60MBs for a 1GB file not cache by the file system in the serverSince network speeds and disk read speeds are not the bottlenecks ... what or where is the limiting factor then?

View 4 Replies View Related

CentOS 5 :: Unable To Set Date On Release 5.2

Feb 23, 2011

I want to modify the system date, so am using the following command:

[root@rad-dev-01 /]# date
Wed Feb 23 10:20:07 UTC 2011
[root@rad-dev-01 /]# sudo date 022407002011
Thu Feb 24 07:00:00 UTC 2011
[root@rad-dev-01 /]# date
Wed Feb 23 10:23:23 UTC 2011

Once i set the date it again get reset..

Note: Am using ssh -i with permission file to connect the system(CentOS release 5.2 ).

View 1 Replies View Related

General :: Possible To Perform An Up-to-date Installation Of CentOS 5?

Feb 15, 2010

Can one perform an installation of CentOS 5 (5.4) so that the system is up-to-date at the time of the first boot (i.e. Anaconda will pull and install the 'latest' versions of the packages directly, and the user needn't run `yum update` | `yum upgrade` after the system has been installed)?

If this is doable at all, is it possible to accomplish without making use of a personally custom-crafted-and-hosted repository (i.e. can one of the official CentOS mirrors be used)?

Also, I'm not talking about creating an install DVD containing the latest versions of the packages, but rather, if the netinstall media can be used to perform this particular type of installation.

View 2 Replies View Related

General :: Put The Date In The Name Of File But Can't Seem To Get?

Apr 11, 2011

I'm trying to put the date in the name of my file but cant seem to get it I just end up with the word date in the file instead of the date. my script looks like this.

#!/bin/bash
x="/var/log/system/"
y=date
z=${y:11:8}
top > $x$y.txt

View 3 Replies View Related

CentOS 5 :: Up-to-Date Network Installation With Broadcom Wireless Possible?

Feb 15, 2010

I must be able to perform customized (non distribution-default) (re)installations of Linux fairly often. As such, I have been looking for a distribution which would allow me to automate the process. CentOS's usage of the Anaconda installer permitting the use of kickstart files, coupled with its stability, maturity, etc. seems to be what I have been looking for. I would like to be able to use the netinstall media in order to perform up-to-date kickstart installations (i.e. grab the 'latest' updates targeting CentOS 5, rather than installing the 5.4 versions and upgrading the system after the first boot).

The wiki seems to provide instructions on creating up-to-date media. However; this is less than ideal, because it would mean burning new media every time I need to (re)install. I realize that finding out if this is possible or not is a simple matter of grabbing the netinstall ISO, burning it and seeing if it supports a direct up-to-date install (or not). However, this is where I run into another problem. The machine in question uses a broadcom wireless card and, as such, would have to make use of it during the installation. I can get the card to work properly on an installed system via the bcm43xx kernel module + 3rd party firmware (extracted to /lib/firmware/ via bcm43xx-fwcutter).

I do not know if it is possible to modify the netinstall ISO so as to load this module (and the modules it depends on) automatically -and- somehow add the necessary files to /lib/firmware/. To summarize (in hopes of clarifying if the long version is confusing) :
1. Can the netinstall media be used to directly install an up-dated system?
2. Can the netinstall media be reworked in order to automatically load the bcm43xx module and can the firmware files be added to the /lib/firmware/ directory of the.. system booted from the media?

View 10 Replies View Related

Programming :: Date In The File Name(cron)?

Mar 12, 2011

I tried to write a cron job in Fedora13 as follows

#!/bin/bash
today='date +%d%m%Y'
cp /var/www/html/site1/module.txt /home/amitha/Desktop/backup/$today.module.txt

[code]....

View 3 Replies View Related

General :: Maximum Date Value From A File?

May 10, 2011

I am facing a problem in finding out the maximum value of a field using awk .. The field is of date format i.e. (MM/DD/YYYY) ..

The contents of the file is :

2/2/2011 XYZ
2/2/2011 XYZ1
2/3/2011 ABC
2/4/2011 ABC

[Code]....

I need to find the maximum of the first column i.e. my output should be 2/12/2011 ..

I was using the below awk script : awk 'n < $0 {n=$0} {print n}{print $0}' <source_file having the above data>

But the output I am getting is 2/9/2011 instead of 2/12/2011 ...

what could be reason for this output and how can I get my desired result ..?

View 3 Replies View Related

Ubuntu Multimedia :: Replace Jpg Files Last Modification Date With Timestamp Creation Date?

Sep 22, 2010

I'm looking for a method for modifying some jpg photo files last modification date with the corresponding timestamp creation date of each file.The reason is that shotwell import pictures in folders according to last modification date which is stupid on my opinion.

View 2 Replies View Related

CentOS 5 :: Unable To Find Php-pear-Date-Holidays For Horde Web

Nov 18, 2009

I was following these instructions[url] and it asks to have this installed yet I am unable to find the file/package.

yum install -y php-pear-Date-Holidays <-- (for now, this package is available in the EPEL repo)

I have followed the instructions on this link [url]

To install ELRepo for RHEL5, CentOS-5 or SL5:

And

How to get the package iinstall and/or recommended steps for horde

View 1 Replies View Related

Ubuntu :: Organize Folder With Images By Date Taken Rather Than Date Edited?

Aug 1, 2011

As a photographer I'm constantly taking photos and storing them in folders. Now occasionally I'm using two cameras (either for different settings or an assistant is also taking photos) which means that for one event I can have differently named images.Both cameras have the same time set (which always helps in Windows) but in Ubuntu when trying to sort my folder by date taken I can't.The options I'm given are to sort them: Manually, by Name, by Size, by Type, by Modification date and by Emblem.Now none of those are helpful to me once I've done a few edits to the images.So please if anyone knows, how do you organise a folder with images taken on different cameras by Date Taken rather than Date Edited?

View 3 Replies View Related

Fedora :: Know The Time And Date Of A File Downloaded From The Net?

Dec 3, 2009

How do I know the time and date of a file downloaded from the net. Is it possible at all? If I want to know when the downloaded file such as a text file was created ie written by the author if not mentioed at all in the entire document. The command I use locally to know file creation time is given below.

Code:
ls -l filename.txt
-rw-r--r-- 1 root root 691 Dec 3 11:12 filename.txt

View 2 Replies View Related

Programming :: Concatenate File Sort By Date?

May 5, 2010

i have text file that filename contain the date of creation (i.e 2010.05.02.log).I would like to create a script that:-Ask for start date -Ask for end date- Concatenate all file on the requested period by date order.

View 1 Replies View Related

General :: Set Date Time Using A File Content?

Jan 13, 2010

I have a file called foo with a date string in it - and nothing else in the file

2010.01.13-22:28:28

I want to send this file content to date -s command so I can modify using a cron job.

I tried several ways to pipe the file contents to date command but did not work.

View 4 Replies View Related

Slackware :: Slackpkg Update - File Out Of Date

Sep 13, 2010

I tried "slackpkg update", and it came back with
Code:
ERROR: Verification of the gpg signature on CHECKSUMS.md5 failed! This could mean that the file is out of date or has been tampered with. I googled this message and it pointed me to this thread: [URL]

However, when I type date I get this:
Code:
bash-3.1$ date
Mon Sep 13 19:55:31 BST 2010
Which is correct for me. Not sure what to do now.

View 7 Replies View Related

General :: Julian Date Converter To Gregorian Date

Apr 22, 2010

Anyone have a ksh solution to convert julian date to gregorian date?

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved