General :: Finding Files Based On Date Without Using `find`?

Aug 11, 2011

I know find can do what I am looking for, but I am wondering if there is an alternative way to find files on the filesystem either created before/after a certain point, or at a certain time.

Typically I rely on updatedb & locate for most of my file searching needs. Issues with those tools, though, are that it only has directory and file names, and it only creates a database of local directories, not anything mounted via CIFS|NFS or via -o loop (eg, .iso images).

So if I need to find files created after yesterday across the entire system (local and remote filesystems), I am currently needing to use find.

What other tools, if any, would accomplish this in a similar fashion?

I have tried ls and grep, but that requires (in my attempts so far) multiple searches:

ls -lR | grep Aug | grep 10
ls -lR | grep Aug | grep 11

View 6 Replies


ADVERTISEMENT

General :: What GUI Linux Programs Are There For Finding Files Based Upon Their Contents?

Sep 18, 2010

What GUI Linux programs are there for finding files based upon their contents?

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

Programming :: Sort Files In Directories Based On Files Date

Sep 8, 2009

I need a script that will take all the files in a given directory and create new monthly sub-directories and sort all the files based on the creation date into the appropriate directory.For example, all files created between 01/01/09 and 01/31/09 will be placed in 'JAN-2009'

View 5 Replies View Related

General :: Find Files In Date Range?

May 31, 2010

ls -l /tmp/empty_file*
-rw-r--r-- 1 root root 0 2010-05-30 08:00 /tmp/empty_file
-rw-r--r-- 1 root root 0 2010-05-30 12:00 /tmp/empty_file1

This looks good, the files expected to be seen are output: find /usr ( -newer /tmp/empty_file -a ! -newer /tmp/empty_file1 ) -print

But this shows me files that should not be output and likewise when I replace ls with tar it is tarring a whole bunch of stuff I do not want: find /usr ( -newer /tmp/empty_file -a ! -newer /tmp/empty_file1 ) -exec ls -l {} ;

In the end I would like to replace the "ls" with "tar cvvfp some.tar {} ;", but can't figure out what is going wrong here.

View 2 Replies View Related

General :: Find All Files Modified In Date Range

Apr 30, 2010

I need to know all files modified within a date and time range.E.g: All modified files between 20 April 2010, 1100-1200 Hrs."find / -mtime +10 ! -mtime +11" :: this i found for date but how to include time as well.

View 2 Replies View Related

Ubuntu :: Renaming Video Files Based On The Date Created

Aug 4, 2011

I have hundreds of MTS and AVI files since 2000 and would like to rename them in the following manner based on the date created: DD-MMM-YYYY HH.MM.SS_X; where X begins at 1 and increments by 1 if there are dublicate date/time stamped videos.

Ex: 19-Nov-2002 08.12.30.avi, 19-Nov-2002 08:13:30_1 and 19-Nov-2002 08:13:30_2

Someone previously wrote the following script for me, and it works great for photos. It uses EXIV2 to get the image date created info. I have tried to understand the script, but am struggling. The video files I have can use the date modified since I have not modified them since I filmed them.

#!/usr/bin/env python
import os
import stat
import pyexiv2
import time
directory = '/home/david/Desktop/test'
[Code].....

View 1 Replies View Related

Programming :: Copy All The Files In The Directory Based On The Modification Date?

Dec 29, 2010

Originally Posted by Kenny_StrawnPlease wrap [CODE] tags aroung any code posted here. The full source that way could still be posted.I am trying to copy all the files in the directory based on the modification date (i.e created on Dec 29). Not able to find the proper command for this. This is what I have tried.

(none) login: root
#
# cd /mnt/hd/

[code]...

View 8 Replies View Related

Ubuntu :: Sequentially Number Files Based On Date Modified - Rename Cli

Nov 8, 2010

Sequentially number files based on date modified (rename cli)

I'm almost done a larger script which takes all the pictures in a folder, converts it to video, and emails it to me. Everything worked fine until I realized the picture filenames weren't always starting at 1, then ffmpeg chokes.

I have a bunch of files in a folder which I need to rename to:

I don't want to install any additional packages and I'd like this to run in a single command if possible.

If not possible, then a bash script would work too.

View 3 Replies View Related

General :: Find A Proper Command To Move A Certain Set Of Files According To Date/time Range?

Mar 18, 2009

I'm trying to find a proper command to move a certain set of files according to date/time range. I am thinking that the command should be something like:

Code:
ls -l | grep 'date/time range' | mv /folder

View 6 Replies View Related

Programming :: Finding Copies Of Files Based On MD5SUM?

Jul 13, 2010

I have a directory with some data files in it. I did an md5sum find, and built an index of all the files contained:

Code:
find ./* -type f -print0 | xargs --null md5sum > MD5SUM

Now, based on my new index, I want to find the copies of these files as they appear in a new directory, where they have been renamed and reorganized.

View 5 Replies View Related

General :: Get Week Number Based On Date With Different First Day It In Gawk?

Jun 24, 2011

How to get the week number in linux using gawk with different first day of the week? the date command can give me the week number with +%V but it is based on Monday (1-53) or +%U (based on Sunday, 0-53).

I tried to to do this: date -d "ddmmyy+2days" +%V, but the result is not correct. I want the first day of the week is based on Saturday.

View 1 Replies View Related

General :: Selectively Tar Based On Date Just The Innermost Directories Of A Single Directory?

Jul 28, 2009

selectively archive the subdirectories of a single parent directory in which said subdirectories have creation year-date 2008 and older.

View 5 Replies View Related

Ubuntu :: Find Log Files And Delete Them Based On Age?

Aug 18, 2011

I want find a bunch of log files and delete ones that are older than say 5 days. Ideally I would then like to add this my crontab to run once a day.

The log files are in /var/log and are owned by root. They have a standard naming convention which is [date]RootCronRsync-backupHOME.log An example file is 20100621RootCronRsync-backupHOME.log Trying to put together a bash script to do this I think I need something like

Code: find /var/log/ -name *RootCronRsync-backupHOME.log -mtime +5 -exec rm {} ; However if I try this without the -exec rm (ie to see if I can find the right files first) I get the following error find: paths must precede expression: 20090405RootCronRsync-backupHOME.log Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]

View 8 Replies View Related

General :: Finding A Console / Text Based XDM / GDM?

May 22, 2010

I would like that users can log to X but this with a text based xdm + how to active it as last in inittab since it is text what contains my inittab

Code:

1:2345:respawn:/sbin/getty 38400 tty1
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3

[code]....

View 10 Replies View Related

General :: Finding Images Based On Their Dimensions?

Nov 5, 2010

I'm not afraid of bash but I'm not very good with it either. I'm assuming there's a way of using find, perhaps in conjunction with another tool, to find images in a directory (and subdirectories) based on their dimensions?

Specifically, I want to find all the landscape-oriented images and copy them somewhere else.

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

General :: How To Find Installation Date Of OS?

Oct 22, 2010

How would i find the installation date of my OS.

View 5 Replies View Related

General :: Find And Sort Results By Date Modified

Jun 7, 2011

so I was wondering how I could do a simple find which would order the results by most recently modified. Here is the current fine I am using. (I am doing a shell escape in php, so that is the reasoning for the variables. find '$dir' -name '$str'* -print | head -10

How could I have this order the search by most recently modified. (Note I do not want it to sort 'after' the search, but rather find the results based on what was most recently modified)

View 4 Replies View Related

General :: Regex - Using Find To Locate Filenames Before A Certain Date?

Jul 11, 2011

I have a ton of files that are timestamped directories. These all look like2011-06-24_13.53.36 // a directory name for june 24th, 1:53:36 pmI have thousands of these directories. I want to do operations on some of the older ones. Let's say I give it a string for date time that matches that exact format, like i'll give it2011-06-25_00.00.00 // june 25th, 12amI want to find all the directories BEFORE my time. So if i give the string for 12am on june 25th, i want to find all the directories before then.If not i can find EVERY directory i have like this and then filter after wards. The created/modified dates are not tied to the actual timestamp im looking for (that would make this easier)

View 2 Replies View Related

General :: How To Find Out What Your Distro Is Based On

Nov 28, 2010

I have been using Linux for quite a while and have gotten pretty good at it, but recently I started using Backtrack in a VM and realized I have no idea what it is based on. Then I got to thinking I have no idea what that even means. For example, OSX is based on Darwin right, but what does that mean? Ubuntu is another that is based on Debian, but I don't know what that means.

The reason I'm asking is because in order to get my screen resolution and networking right in Backtrack I need to know what it is based on so I can download the proper packages to install the VirtualBox guest additions, and I have no idea. Is there a way to get this information from the operating system? Maybe uname -a is giving me the info and I just don't know where to look in the output?

View 7 Replies View Related

General :: BASH To Find Pics And Videos With No Date Taken Exit

Aug 7, 2011

Is there a script to do this? I have shotwell and want to find files that are going to cause problems with automatic sorting.

View 3 Replies View Related

General :: Offline Method Required To Find Out Number Of Days Since A Certain Date?

Dec 13, 2010

What offline method is there of finding out days since a certain date. Example: How would someone find the number of days from 1-Jan-2003 to 7-Dec-2010? Could someone write a script that takes in the 2 dates and output the number of days?

View 5 Replies View Related

General :: Download Centos Based Rpm But Only Find Redhat Rpm's On The Net?

May 26, 2010

my problem is sinple, I want to download centos based rpm but i can only find redhat rpm's on the net. can I use redhat rpms for centos?

View 2 Replies View Related

General :: Deleting Files By Date

Nov 5, 2009

I had a program run riot and it has created hundreds of spurious files in one directory. Fortunately they are all dated 4th November so are easily identified. What bash command can I use from the console to delete them all?

View 2 Replies View Related

SUSE :: Determine The Report File Name Based On The Source Directory Name And Current Date?

Apr 17, 2010

### TO DO: Determine the report file name based on the source directory name and current date### The report name and thumbnail directory must follow this pattern: source-%j-%H### for example, for pictures in /home/you/pictures, the file name will be: pictures-%j-%H### HINT: Use sed to extract the directory name from the path and combine it with date command output

View 1 Replies View Related

General :: Untar And Only Extract Those Files That Are Above A Certain Date

Jun 16, 2010

Is there any way to untar and only extract those files that are above a certain date including directory structure??

I restored a backup on a play server but it was a few days old. However I have a tar archive of the entire structure that is more up to date and healthy so now I want to extract all files (including directory structure) based on a date filter on the files if possible?

View 2 Replies View Related

General :: Copy Files Revised After A Certain Date?

Feb 15, 2011

I am running ubundu 10.10 and want to copy all files revised after a certain date (01.02.2011) to a certain location (usb memory stick) for backup purposes. How do I use the "cp" command, or do I have to use any other command ? Or may be this is not possible in Linux ?

View 1 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 :: Adding A Files Creation Date To It's File Name?

Sep 17, 2010

I have some basic experiencing creating simple scripts/making directories/changing permissions/etc. but I'm stumped on this one.

I have two linux boxes. I have a script set up on box 'A' to SCP into box 'B', grab a copy of a database backup and store it on box 'A'. It looks like this:

scp root@X.X.X.X:/blah/blah/blah/dump.23.gz /home/blah/DB_Backups/

I have generated a public key on box 'A' and placed it into the authorized_keys file on box 'B', so a password is not required and the file copies over successfully when the script is run. On to my problem...

I need to know what date the 'dump.23.gz' file was originally created when I'm viewing it after it's been copied to box 'A'. If I ls -l on box 'A' it only shows me the date it was created on box 'A' when it was copied.

What would I need to add to my script to append the backup's original creation date on box 'B' to the filename so that when it gets copied to box 'A' I know when the backup was created on box 'B'. I'm sure this is probably confusing. I've done lots of searching and can only find information on how to append the current date and time to a file name. I need to append it's original creation timestamp to the filename when it copies over.

View 10 Replies View Related







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