General :: Find In Between Particular Dates

Oct 29, 2010

find / -newer -10 mtime +30.i want to check only those files which are modified yesterday.

View 1 Replies


ADVERTISEMENT

Ubuntu :: Method Required To Find Out Number Of Days Between 2 Dates?

Dec 15, 2010

Can someone show me a simple method to find out number of days between 2 dates?

Example: How would I find the number of days between 25-12-2003 to 25-12-2010? Could someone write a line of code that takes in the two dates and outputs the number of days? Or is there a program that can do this?

I know of websites that do this but I'd also like an offline method.

View 9 Replies View Related

General :: Sort As Per The Dates And Months

Feb 22, 2010

I am getting little bit difficult in sorting the date ranges which are in a field like:

How make a sort as per the Month and date , i mean result should be as per the month and date wise. If i go for the sort -M , i am not able to get the list as per date of the particular month.

View 4 Replies View Related

General :: Compare 2 Dates In European Format (dd/mm/yyy)?

Oct 12, 2009

I need to compare 2 dates in european format (dd/mm/yyy). date -d<my date> %s command converts date into unix epoch (integer), thus make it easy to compare. The problem is that -d (or --date) option interprets date in US format-ie mm/dd/yyy.

View 4 Replies View Related

General :: Convert Past Or Future Dates In Awk?

Mar 20, 2010

All I see from googling examples in awk is converting current date. How do I convert a list of past or future dates for example :

Jan18'09
Aug 7'98
Jun20'11
Apr 1'10

I will be using it to compare dates in a file and act on it accordingly.

View 5 Replies View Related

General :: Rsync Files With Dates After A Certain Date?

Jun 8, 2010

I was going to do a rsync -r -a -z -v -p -e sshto move some files frome server to another, but then realized all I really need are files which have dates starting June 1, 2008 to current. Is there a way to have rsync only sync those files?he directory structure that's my source goes all the way back to 2004.

View 5 Replies View Related

General :: Kill All The Processes That Have Dates Older Than Today?

Feb 11, 2011

I issue the command ps -aux | grep tony. It displays the following output

tony 10986 0.0 0.0 33532 464 ? S Feb01 0:00 vncconfig -iconic
tony 10988 0.0 0.0 86012 512 ? S Feb01 0:00 twm
tony 15553 0.0 0.0 92404 1848 ? S 10:34 0:00 sshd: tony@pts/34

[code]....

View 3 Replies View Related

General :: Processing Log File Within Certain Dates Based On Filename

Apr 8, 2010

I am working on the script parsing specific message "TEST" from multiple file. The log file name looks like:

N3.2009-11-26-03-05-02.console.log.tar.gz
N4.2009-11-29-00-25-03.console.log.tar.gz
N6.2009-12-01-10-05-02.console.log.tar.gz

I am using the following command:
zgrep -a --text "TEST" * | awk -F"[ .,]" '{sub(".*:","",$6); sub(",.*","",$7); print $1,$6,$7,$10}
and getting
N3 2009-11-25 20:12:57 TEST
N4 2009-11-28 10:42:18 TEST
N6 2009-12-01 10:00:24 TEST

If I only want to search the log file after 2009-11-29, what shall I change the command?

View 1 Replies View Related

General :: Delete Old Directories Based On Dates In It's Dirnames?

Jul 13, 2011

I have tried to find the solution for my problem on this site and other sites but haven't found a good enough answer yet. Maybe some of you can help me out here?What i need is a script (bash preferrably) that can delete directories based on a date in its dirname.For example.I have a bunch of directories that is named

data-20110623/
data-20110624/
data-20110625/

[code]...

View 5 Replies View Related

General :: Script To List Deleted Files With Dates?

Mar 29, 2011

I created a script to move files to a "trashbin" This is my code:

Code:
mv $1 /home/giovanni/trashbin
echo "$1 Deleted"

[code]...

View 13 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

Software :: Dir And Dates Listings Are Not Consistent?

Jan 26, 2011

It only occured to me now, but why is it that date listings are not consistent?

ex:

Code:

They are all Month Day Year but one (from that particular extract, there's more), why is the 3rd there one Month Day Time? I know the year is not 2011 because we have not hit august 2011 yet, but what if it's 2009 or 2008? I would not know.

One of my sites got hacked and I'm just trying to figure out what the hacker got into and trying to figure how he got in so I can fix the exploit.

View 3 Replies View Related

Ubuntu Security :: Interpret The 'dates' In Rkhunter.log?

Oct 6, 2010

I've got rkhunter installed and regularly do scans immediately before & after updates & if I get warnings about 'file property updates' after the update I use 'rkhunter --propupd' to give me a clean run.I'm about to setup a ubuntu computer for my nan, I want to enable automatic security updates so she doesn't have to do anything to keep her system secure. I was planning on running rkhunter when I go to her house (about once a month) and check the dates in the resulting rkhunter.log warnings with those in the var/log/apt/history.log to see if legitimate updates caused any rkhunter warnings. I've noticed though that the 'Current file modifiation time:' in the rkhunter.log warnings are incorrect.

My system seems to be about 15 days behind the actual date, I've now run rkhunter --propupd so I have no warnings but got this one off another forum post to show what I mean:

Current file modification time: 1283341157 (01-Sep-2010 06:39:17)

I believe that the '1283341157' is the time in some strange format and the date in brackets is what rkhunter thinks it might be in human format.

1) How to interpret the 'strange date format' (1283341157 in the line above)?

2) If there's a way of configuring the date in rkhunter so that they're correct in rkhunter.log?

3) If there's a better way of keeping her system up-to-date & secure, it's her first computer & she's 86 so I think setting up automatic security updates is the way to go, it'll be one less thing to overwhelm her!

View 2 Replies View Related

SUSE :: Get All Month Start And End Date Between Two Dates?

Dec 22, 2010

I have a requirement where I need to write to a file a block of static text for each month starting from 01-01-2000. It would be something like below

[code]...

View 2 Replies View Related

Programming :: Script To Generate Random Dates?

Aug 3, 2010

A script to generate random dates. It uses the year range 2006-2009, and truncates every month of the year to an ordinary February's 28 days, but otherwise it's pretty solid and safe.

Code:
spate=1
while [ $spate -le 120 ]

[code]....

View 1 Replies View Related

Server :: Squid Proxy Not Generating Reports For All Dates?

Feb 6, 2010

I am having squid proxy server running on OpenSuSe 10.2 I noticed when I generate report it just shows me last date log file.Although /var/log/squid contains logs of all previous dates.I really cant remember which file to modify so that I can see all dates reports in html when I use following command Quote: cat access.log | /home/user/squint-0.3.10/squint.pl /home/user/report<date>

View 9 Replies View Related

Software :: App To Quickly And Easily Change File Dates?

Aug 14, 2010

I am using Ubuntu 10.04. I wish I could use Nautilus to change file dates, but I guess that does not work.

Is there another file manager, or something, that allows me to do this? I know about the touch command, but that's a little cumbersome for I am trying to do.

View 2 Replies View Related

Red Hat / Fedora :: List Of Recent 9 Kernel Updates With Dates?

Jun 21, 2010

where I can find a list of Fedora 9 kernel updates (i.e. the updates that come through yum update) along with the dates they were released? I'd like to know when the last kernel I have installed (2.6.25.14-108.fc9.x86_64) was publicly released.

View 4 Replies View Related

Programming :: AWK: Compare Apache Dates Without Using Regular Expression

May 15, 2010

I'm writing a loganalysis application and wanted to grab apache log records between two certain dates. Assume that a date is formated as such: 22/Dec/2009:00:19 (day/month/year:hour:minute) Currently, I'm using a regular expression to replace the month name with its numeric value, remove the separators, so the above date is converted to: 221220090019 making a date comparison trivial.. but.. Running a regex on each record for large files, say, one containing a quarter million records, is extremely costly.. is there any other method not involving regex substitution? here's the function doing the convertion/comparison

[Code]...

View 13 Replies View Related

Hardware :: How The Dates Work - System Automatically Adjusting Time

Nov 23, 2010

When the computer is on... we assign a date and time... My question 9is how is the system automatically adjusting time when i start my machine even months after...

View 4 Replies View Related

Software :: Webcamrc Configuration Not Parsing Dates For Image Filenames?

Jan 6, 2010

I am running webcam under Ubuntu 9.04 and I want to upload the images it captures to a server via ftp and have every image have a date and time in the filename. But I can't get this to work.From reading the man page for webcam it appears that I should be able to specify file = "webcam_%Y-%m-%d_%H:%M:%S.jpeg" and have it parsed so I get something like webcam_2010-01-05_10:54:23.jpeg but webcam is just uploading an image with an unparsed filename. So instead of getting a series of images on the server, I just get the most recent image (with the older images being overwritten every 1800 seconds). I know I could write a script on the server to rename the files as they are uploaded and put it on a cron but this seems to be something webcam should be able to handle.Here is my .webcamrc config file:

[grab]
device = /dev/video0
text = "webcam %Y-%m-%d %H:%M:%S"

[code]...

View 2 Replies View Related

Programming :: Calculate The Minutes Difference Between Two Dates Using The Function Mktime() On C++?

Jul 28, 2010

I'm trying to calculate the minutes difference between two dates using the function mktime() on c++. The dates will be passed to me as struct tm, and I will use this function many many times. The example below shows what I wanna do:

Code:

int main(int argc, char** argv) {
while (1) {
tm date2;
tm date1;

[code]...

I read the mktime() description on c++ reference, searched google... but there is no light

View 4 Replies View Related

Fedora Servers :: Check In Dates Getting Changed / Updated To System Time

Jun 21, 2011

I am using the default CVS available in Fedora 9. I initiated the CVS server by
cvs -d /usr/local/cvsproj init
To check-in and check-out the following exports commands are used
export CVS_RSH=ssh
export CVSROOT=:ext:swathi@SERVER:/usr/local/cvsproj

I shall explain problem by taking an example. A project was checked in long before (for example the checkin date is 25 Feb 2010). And today (i.e. 21 June 2011) I checked out the project from the repository. After checkout, the date of the project in the repository is changed from 25 Feb 2010 to 21 June 2011. This date is set to all the subfolders in that project. But the files in the project retains the checking date i.e. 25 Feb 2010. Why the check-in dates are getting updated/changed to the system time after doing check-out.

View 2 Replies View Related

Ubuntu :: Evolution - Display Birthday Dates From Other Address Books Than Personal

May 21, 2010

Basically it's all in the title. Birthday and anniversary dates from address books other than Personal - whether these are local or remote - do not display in the calendar. I have so far found no settings whatsoever that would trigger the expected behaviour. It would in fact be good enough if the display could be switched to other than Personal address book at all...

View 4 Replies View Related

General :: Find Mechanism With Irregular Expression (find Command) Or Perl?

Sep 7, 2010

I have 4 Linux machines with cluster.My target is to find all kind of IP address (xxx.xxx.xxx.xxx) in every file in the linux system remark: need to scan each file in the linux system and verify if the file include IP address if yes need to print the IP as the following

more /etc/inet/file.example1

182.23.2.4
255.255.0.0
10.10.1.1

View 1 Replies View Related

General :: Find/grep/wc Command To Find Matching Files - Print Filename And Word Count?

Sep 11, 2009

I am trying to do a find/grep/wc command to find matching files, print the filename and then the word count of a specific pattern per file. Here is my best (non-working) attempt so far:

wc `find . ( -name "*.as" -o -name "*.mxml" ) -exec grep -H HeightResizableList {}` ;

View 10 Replies View Related

General :: Command Line - Use Find To Find Text Files?

Jul 15, 2011

Is there a way to specify to find that I only want text files (and not binary files)? Grep has an option to exclude binary files, so I thought find probably has a similar feature, but I've been unable to find it.

View 2 Replies View Related

General :: GNU Find: Disable The Error When 'find' Finds No Matches

Aug 21, 2011

I've got a setup where I need to use 'find' to find 0 or more files in a certain directory, however, 'find' always produces an error when there are no files that match a certain check. Is it possible to run 'find' while having it omit errors when no files match the pattern?

View 2 Replies View Related

General :: Using Find Or Grep To Find A Group Of Text Strings?

Feb 28, 2011

I have used diff command in past.I faced a situation to which I did not had a cluehere are some text strings (which can be stored in a file)Quote:

CONFIG_XEN=y
CONFIG_XEN_PVHVM=y
CONFIG_XEN_MAX_DOMAIN_MEMORY=128

[code]...

View 3 Replies View Related

General :: Find Setuid Files Using FIND Command?

Jan 25, 2009

I know how to search for normal files but can you let me know " How to search for 5 setuid files on the system. Also explain, for each file, why setuid mechanism is necessary for the command to function properly"

View 1 Replies View Related







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