General :: Copying Files According To Modification Date And Extension?

Dec 30, 2010

I am trying to find a command which will copy all the files in the folder with extension ".log" which is created one day before the current date. By going through other threads in this forum I found the half solution to this problem

find /mnt/hd -mtime -1 -exec scp {} /mnt/usb ;

This command copying the all the files created one day before(not only *.log) to the /mnt/usb folder. what is the modification required to above command.

View 5 Replies


ADVERTISEMENT

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 :: Merge Files By Creation / Modification Date?

Oct 4, 2010

I have a folder with hundreds of .txt files (logs of some java application) that I have to merge in to one single .txt file. This application produces a new log file everyday:

day1: logFriday10September2010.txt
day2: logSaturday11September2010.txt
...
day8: logFriday17September2010.txt
...
and so on...

I could merge the files easily with "cat" and ">>" however, the problem is that I have to do it by taking into account the date (creation or modification) of the file.

If I simple use the cat command the output file will receive for example, all Fridays in a row, then all Saturdays, etc. and in that way I'm not considering the date.

I've searched for the options of the find command, since the files after creation are not modified...I try to use this for example:

$ find . -newer <some old file>

but that lists me all files after that <old file> and not by correct date.

View 5 Replies View Related

General :: Logrotate Not Rotating Files With Date Extension?

Oct 25, 2010

I am trying to configure logrotate on APP/DB servers.As per my backup policy,logs will compress in daily basis and and will be moved to a Central storage device.

My tomcat generate several application logs with date extension as well as .log extension.For eg app.log,app.log.2010-10-23-14,catalina.out,catalina.2010-10-25.log etc.

Currently my tomcat logrotation /etc/logrote.d/
#cat /etc/logroate.d/tomcat/
/usr/local/tomcat/logs/*log {

[code]....

But its rotating logs only with .log extension..ie app.log.2010-10-23-14 (with date extension) is not rotating.If i put "*" instead of "*log",its rotating all files including rotated files. How can i rotate files which is having date extension.Also i dont want to keep rotated logs for more than 3 days.

View 1 Replies View Related

General :: Change A Files Modification Date "only" Without Changing The Time?

Oct 29, 2010

I'd like to change a files modification date "only" without changing the time. I'm aware of the 'touch' command but is seems like it only allows changing both the date and time, and not one of them. Any ideas on an easy way to change a file's modification date without also changing its time? (I have a long list of files and thus would like to run one to command to change them all)Example: Change a file's (month) timestamp from "2010-09-23 11:59:23" to "2010-10-23 11:59:23"Background: I accidentally set the wrong month on my camera and ended up with all photos having a modification timestamp with the wrong month.

View 3 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 :: Copying Windows Files By Extension?

Mar 8, 2010

I want to search a Windows partition for all .doc and .xls files and move them over to Xubuntu to burn them to CD.

Is this easiest to do via terminal? I tried to use catfish and select all files, but I think my Mac keyboard (and USA standard keyboard settings) threw the select all files ability.

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

Ubuntu :: Image Viewers That Can Sort By Modification Date?

Sep 15, 2010

I like ordering my images my date modified, but Eye of GNOME only lets you view them by alphabetical order.

Important features for me are: Going through items with the arrow keys. Zooming in and out with the mouse wheel. Being able to sort by modification date, type, or name. Being able to right click and open with either another window of the same viewer, or with another viewer. Having a simple interface

So far, I've tried:

Eye of GNOME - I love how simple it is, and if it wasn't for this sorting problem I'd keep using it. Well, that and the fact that you can't right click and open an image in a separate Eye of GNOME window while continuing to scroll images in the current window.

gThumb - Damn. So close to being a winner. Can't pass images with the arrow keys or zoom in and out with the mouse wheel, but I can sort by modification date, it's simple, and can open another window of the same viewer. But those first two points are also important for me.

Fspot - A little too cluttered when opening a single image. I don't really need to see a top panel with the other images, even if it's nice. I can go through images with the arrow keys, and zoom in and out, but no sorting by modification date.

Shotwell - Shotwell's viewer is pretty fast and simple, however it has lots of flaws for me: can't sort by modification date, can't zoom in and out with mouse wheel, can't open an image in another window while viewing it. At least it's simple and I can navigate with the arrow keys.

View 4 Replies View Related

Ubuntu Multimedia :: How To View Pictures By Modification Date

Mar 25, 2011

When I go in a file with pictures and right click on it I tell it to arrange pictures by modification date but when I start viewing the pictures and click on next then it shows them to me in Alphabetical order.I am using Eye of GNOME 2.32.0 to view picturesHow do I get this application to show me the pictures by modification date

View 4 Replies View Related

Programming :: Bash Script To Copy Modification Date From A File To His Folder?

Jul 29, 2011

I need this script but I don't know how to do it I have one folder with several folders inside.On each folder a have one MKV or AVI file inside...What I need is a script to change the "modification date" of each folder to the "modification date" of each MKV or AVI that the folder has inside.

View 16 Replies View Related

General :: How To Only Copy Executable Files (or Without Extension)

May 9, 2011

Suppose there is a directory named mydir containing ...
aaa.cpp
aaa.h
bbb.cpp
bbb.h
Makefile
a
b
Where a,b are executable files. What I want to is to only copy a and b to another location. Is it possible? (other than by manually issuing copy a,b another_dir).

View 2 Replies View Related

General :: Run Same Command On Multiple Files With Same Extension?

Nov 10, 2010

how to run a command on all files with the same extension in a directory like this:

Code:

tex breqn.dtx; tex empheq.dtx; tex flexisym.dtx; tex mathstyle.dtx; tex mathtools.dtx; tex mhsetup.dtx; tex xfrac.dtx;

but in a simpler manner? I found this: Code: find . -type f -name *.dtx -exec tex {} ; but isn't there something simpler?

View 4 Replies View Related

General :: Two Different Color Coding For Two Files Having .c Extension

Jan 15, 2011

In Fedora, I used the ls -l command to see the directory listing. But I noticed that while all .c files were being shown in green , there was one .c file which was being shown in black.How can two files having the same extension be executable /normal?

View 1 Replies View Related

General :: Unable To Install CPIO Extension Files

Apr 23, 2011

I want to install Forms & Reports Developer Suite in Linux OS So I have downloaded Oracle Developer Suite 10g for Linux (Including Forms & Reports)
as_linux_x86_ids_101202_disk1.cpio
as_linux_x86_ids_101202_disk2.cpio

So in the Oracle Documentation Site they have given Guide as Follows:
To extract the cpio file,
move the cpio file to an empty directory,
then do:
cat filename.cpio | cpio -icd ....
but its not extracting.

View 7 Replies View Related

General :: Find Files With Specific Extension And Move To A Directory?

Apr 18, 2011

I need little help. I want to find all files with extension "*.tar" "*.gz" and "*.zip" and move all those files into "/opt/old" directory. I've tried this command:

Quote:

find . -type f -name "*.tar" "*.gz" "*.zip" -print0 | xargs -0 -r mv /opt/test

It's not working, something wrong after "mv" i guess.

View 10 Replies View Related

General :: What Is The Extension Of Datadbase Files In Clamd Service And Where It Stored

May 10, 2010

Want know the location of the Clamd service database, and also know the extension of these database fies.

View 2 Replies View Related

General :: Copying Files Using Smbclient?

Jun 7, 2010

I have a new network attached storage unit that I'm trying to transfer my data to. On this NAS, it has a very basic linux installed with SSH enabled. Browsing through the programs installed on it, i found smbclient. Am I able to copy files directly from my old NAS to my new one using smbclient?It would sure beat transfering 950GB from my old NAS through a computer then onto my new NAS.

View 1 Replies View Related

General :: Copying Files From Windows?

Jan 3, 2011

How can I copy some files from a windows machine to Linux machine ?

View 13 Replies View Related

General :: Copying Photo Files To CD?

Jan 16, 2010

I am running openSUSE 11.2 KDE 4.3.4 on my ThinkPad R51 laptop.I would like to copy 'File A, File B, File C' (for example) that has photographs of a holiday , to a blank CD inserted into my drive and cannot find a way to 'copy and paste' into the volume.

View 3 Replies View Related

General :: Shell Script To Search For Files Of Specific Extension And Delete Them All?

Mar 17, 2010

i want such a shell script or single line command to delete all the files with extension specified in script i have bash !! ex... delete all files of extension .obj

View 4 Replies View Related

General :: Prevent SCP From Copying Local Files?

May 17, 2010

I just read the Linux scp command issue question and it reminded me that I regularily forget to specify the colon in the host part of a scp command, and thus copying a file locally instead of copying to a remote host, e.g. I do
scp foo host
instead of
scp foo host:
But I never use scp to copy a file locally. So I wonder if there is a way to make scp fail if both (the source and destination) arguments refer to local files.

View 1 Replies View Related

General :: Copying Files From Ubuntu To Windows Xp?

May 8, 2011

i am accessing linux through putty and i wrote somany programs in unix using putty and gedit but now i need to copy all files into windows. how to copy directory(linux) to folder(windows) without installing any softwares?If it is necessary to install software to copy files then tell me the process of using that software.

View 5 Replies View Related

General :: Copying Files From Current To New Server?

Oct 9, 2009

I'm trying to copy files from my current server to a new server. Both servers have SSH installed. These are the commands I'm using. However I'm getting connection refused. I did a google search and found out that maybe the reason of this error could be due to the fact that my current server doesn't have SSH. However I use SSH often on my current server so I can say that it has SSH for sure.

OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to IP_OF_CURSERVER [IP_OF_CURSERVER] port 22.
debug1: connect to address IP_OF_CURSERVER port 22: Connection refused
ssh: connect to host IP_OF_CURSERVER port 22: Connection refused

View 4 Replies View Related

General :: Copying Bulk Files From One Server To Another

Sep 30, 2010

I need to copy a large number of files, it comes to 1 lakh from one server to another. When I tried various commands using scp , ftp etc. It is saying "Arg list too long". In which way can we copy all the files. The Two servers are under Linux.

View 4 Replies View Related

General :: Copying Latest 10 Files From One Folder To Another?

Nov 19, 2010

i want to copy the latest 10 files from one holder to another. All the files start with the number 2 and this is what i have so far:

lt -lt 2* | head -10

So i want to copy that output of 10 files to another folder

View 5 Replies View Related

General :: Copying Doc Files From Multiple Directories To One?

Feb 1, 2010

I have 60+ directory's each containing multiple .doc files. I need to move them to a single directory and keep their file name intact. I don't think cp will do that with out listing all the file names. I was thinking of something like: cp -r /dir/*.doc /newdir . Or should I use a combo like find -type *.doc|cp /newdir?

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

General :: Copying Large Number Of Files From One Directory To Another

Feb 10, 2010

I've a directory containing around 2.8 lacs of files. I want to move them to another directory.If I use cp or mv then I get an error 'argument list too long'. If I write a script like

for file in ls *; do
cp {source} to {destination}
done

then because of ls command , its performance degrades.How can I do this?

View 7 Replies View Related

General :: Copying Large Number Of Files In Windows?

Mar 15, 2011

I am facing problem in copying a large number of file 18 lakh (18,000,000) files from my personal hardisk to another hardisk each file is very small and size of folder is around 3.95 GB copying files using copy given by Windows is frustrating and I am not even able to compress file its giving me error that its not readable.And problem is I am not able to open this drive in Linux it showing me error there saying do diskchk in Windows and Windows disk check is also not able to repair this drive and goes into some mode unsolvable.Is there any way to open disk with error to open in Windows and if not any way I can copy data faster?ERROR: Disk labled EDU is corrupt go to windows and chkdsk /f there and reboot into window 2 times.

View 3 Replies View Related







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