Programming :: Get Script To Delete Files If They Are Certian Date?

Feb 21, 2011

the moment the file name goes as backup-"$(date +%d-%b-%y)" so something like backup-13-Feb-11.I have already setup in my script to make sure the backup was successful and is not corrupt what I need to do next if for exampleif I backup for 21st feburarybackup-21-Feb-11if it finds anything older than five days for examplebackup-13-Feb-11 it will delete this. I want the old delete part to work on the filename not a system time stamp

View 7 Replies


ADVERTISEMENT

Ubuntu Installation :: Boot From CD Drive It Came Up With Something Like "IOSLINUX From A Certian Date To Now" But Didnt Load?

Feb 20, 2011

I have an old Dell Dimension 2400 and want to install the latest version of the OS. I downloaded the software and burnt the image to a CD. I new the CD had worked as it was recognized by my laptop. When i insert the disk into my CD drive i selected boot from CD drive. It came up with something like "IOSLINUX from a certian date to now" but didnt load.I load up the computer like normal and clicked on the CD from my computer. It came up with a message like " The application could not be loaded, reinstalling it may fix this".

View 9 Replies View Related

General :: Delete Files In Folder Before Todays Date?

Sep 14, 2009

I currently have a command to backup a directory it will zip the directoryand place it where i have told it too, Now what i am after is a command i can run before my code, that will delete and tar.gz files before todays dateso i my ideal world it would be something like this, delete <'date +%m_%d_%y'.tar so this will delete all the files in this folder before todays date,

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

Programming :: Search Of All Files In Computer Between Range Date?

Apr 13, 2011

I'm looking for a c++ code that search for all files in computer between two input dates (example- 3.3.2011 and 11.4.2011)and copy all file in that range in new file .the user run the program and input date and path in dos system

View 8 Replies View Related

Programming :: Monitor When Files Are Copied To Another Volume And Log The Date?

Jul 29, 2010

I'm pretty sure I'm in over my head with this one. Here's the situation: My practice has been, after downloading and making changes to files, to use a certain GUI cataloging app to move them to categorized sub-folders inside one "umbrella" folder, then copy them to (what are in most cases) identically-named sub-folders in another one on the same HD. Emulation of this process on the command-line would look like:

Code:
cp holytrousers.jpg /home/metoo/Pictures/fancypants/
mv holytrousers.jpg /home/me/Pictures/pants/

This was in anticipation of making a "twin" of the second, now bigger, "umbrella" folder on anexternal HD and continuing the practice. At some point I intended to get rid of the original 2nd "parent folder" and just keep the first one on the drive with my OS install, using the twin on the backup folder as I'd been doing when it was on that same drive.

I'm very close (a matter of 2 to 3 weeks, it looks like) to getting a backup/external drive in a reasonably-reliable external enclosure. With the backup, originally the "twin" of the bigger "umbrella" folder and its sub-directories, on that other drive, I also anticipate that I will likely go at least a few days between backing up any new files to it.

For the sake of argument, let's say I gave the external the name "tuxs_twin". Is there any way to monitor copying activity from /Pictures/ on the boot HD to /media/tuxs_twin/Pictures/ and log the dates and times, then have something running that checks the log every so many hours and puts up a reminder dialog saying /tuxs_twin/Pictures/ hasn't had any new files copied to it since date X at time Y? I hope this was clear enough. If not, I'll try to break it down further when I know which details are confusing folks.

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

Programming :: Delete A Specific Range Of Files?

Aug 13, 2010

I have 50 files in the following format.

fileone.0001.txt
filetwo.0002.txt
filethree.0003.txt

[code]...

View 4 Replies View Related

Programming :: Delete Files Older Than 7 Days?

Jan 3, 2011

I am new to unix, I am looking for a script to delete files older than 7 days but i also want to exclude certain directories (like arch,log .....) and also some files with extensions ike .ksh, .ch, ..............) in directories and sub directories

View 4 Replies View Related

Programming :: Script To Delete And/or Rename Files?

Apr 17, 2010

We have a problem at work that we are using Word Press And now for security we have to delete install.php in WP-Admin and rename upgrade.php and install_helper.php to *.bak
Im a noob in Script creating (Had a bit practice a couple of years ago but allready forgot T.T) So what i ask that is there a way to make a script

That:Finds wp-admin(if it exists) folder enters into it and there deletes install.php and renames upgrade.php and install_helper.php to *.bak and the makes the same process again untill theres no wp-admin folders left with these files, We have alot of web pages so manually it would take about a month to find em all (about 3000 pages :

View 5 Replies View Related

Programming :: Script To Delete Selected Files?

Aug 4, 2010

I am writing a script to delete certain files
say

Code:
find / -name lighttpd
gives following output
Code:
/etc/init.d/lighttpd
/etc/lighttpd
/home/lighttpd
/opt/lighttpd-1.4.x/src/lighttpd

I do not want to delete file in home directory but rest all. In one shell script. So first line I am clear with but what can be the second line,

View 14 Replies View Related

Programming :: Delete All Files With Specific Word In Filename?

May 21, 2011

I need a command to find the all files which filename contains the text "SomeText" and to delete that files!From /home/movie/wp-content/uploads/this folder I have lots of files and folders .Also I need that for folders and subfolders who contains some text in folder name "someTextInFolderName"

View 13 Replies View Related

Programming :: List Specific Files And Delete Results?

Jul 8, 2011

I ran the command:

Code:

ls -ltr | head -n40

I'd like to delete all the files listed...

View 2 Replies View Related

Programming :: Made A Shell Script To Copy And Delete Files Through FTP?

Feb 13, 2011

I have made a shell script to copy and delete files through FTP.I want to first delete all txt files and then mput all txt files.

Code:
ftp ()
{

[code]....

View 6 Replies View Related

Programming :: Shell Script To Automatically Delete Files With The Same Name As The Parent Directory?

Mar 18, 2010

I am facing a problem in Windows due to a virus called Newfolder.exe which creats files with the same name as it's parent directory and an extension .exe and this happens for every directory in the entire hierarchy in the infected pen drive. The antivirus detects them, but is sucking slow. So I thought this is a good opportunity to use the concepts of the all mighty shell script to remove those as they follow the same pattern. Say my complete path is

Code:

/home/pkd/fol1/

The virus would have created an file with complete paths

Quote:

/home/pkd/fol1.exe

If fol1 has two more directories fol11 and fol12 Then there would be two more .exe(virus created) in the following path

Quote:

/home/pkd/fol11/fol11.exe
/home/pkd/fol12/fol12.exe

View 1 Replies View Related

Programming :: Shell Script To Delete Files Which Location Should Be Read From Log File

Jun 26, 2010

I have 2 external hdd in wich I have all my files. yesterday, I have copied all the files from hdd2 to hdd1 and I want to eliminate duplicates so I used FSLint to find them,now I want to make a shell script to delete all the files/entries (read from the log file) that begin with.

View 14 Replies View Related

Programming :: Create/delete Temp/backup Files Through A Shell Script?

Dec 31, 2008

I have a shell script that need to create some files:

1) backup files of user passed in file ( that will be written by this shell ).

2) temp files that the shell will create and later delete/remove.

This shell script will be used from my local dir ( I am not a super or a sysadmin ). Users of this shell will call this script to run on their local files in their respective directories. When my script runs, it errors with the following:

cp: cannot create regular file `./listfile.txt.backup': Permission denied
/home/myUser/tools/myShellScript: line 12: listfile.txt: Permission denied

for the temp I was able to avoid this error by creating the temp file in the /tmp directory. All I want is for this shell script to run, create/modify/backup files in user's local dirs.

The user dir has the following permission:

drwxr-xr-x testDir

the file that needs to be backed-up has:

-rw-r--r-- listfile.txt.

View 7 Replies View Related

Programming :: Finding A Shell Script To Delete Files Which Location Should Be Read From A Log File?

Jul 16, 2011

I have 2 external hdd in wich I have all my files.... yesterday, I have copied all the files from hdd2 to hdd1 and I want to eliminate duplicates so I used FSLint to find them, now, I have a txt file that looks like this:

Code: /media/My Book/!!!MIS DOCUMENTOS/Documentos/2 sep2003-jun2009 USB/!TESIS/TESIS/TESIS CVT LABVIEW Y CODEWARRIOR/LabVIEW85RuntimeEngineFull.exe /media/My Book/HDD_Toshiba/Borrable/Pen_Drive_4GB/Tesis/Super CD de la tesis/LabView/LabVIEW85RuntimeEngineFull.exe multiplied by millions of entries...

now I want to make a shell script to delete all the files/entries (read from the log file) that begin with:

Code:

/media/My Book/HDD_Toshiba/**** Since HDD_Toshiba is the folder in hdd1 (MyBook) that contains all the files from hdd2

View 1 Replies View Related

Ubuntu :: Rsync --delete Doesn't Delete Superflous Files

Sep 25, 2010

I am trying to use an old box as backup server. I have tried a couple of possibilities along the lines of:

Quote:

rsync -a --delete --progress --log-file=/home/$USER/info.txt -e ssh /home /etc root@192.168.0.106:/mnt/back

The problem is it does not delete files that has been removed from my local system?
I run the command as root on the local system.

(I realize I should properly not ssh into the server as the server's root but I'm having trouble with the permissions and I want to make sure everything else works before messing around with it)

View 2 Replies View Related

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

Ubuntu :: Can Delete These 'un-delete-able' Files In Trash?

Nov 1, 2010

I just can't stand knowing that there's a slight problem with my PC.I have roughly 12.5 Gigs of files, mostly movies that are multiple clones of a particular movie (which was an entirely different problem altogether) and I CANNOT DELETE THESE THINGS! There has to be a simple way to do it from terminal, problem is, I can't seem to find the trash directory in terminal.

View 3 Replies View Related

Software :: Application To Eliminate Doubles In Files / Rename Changed Files With Date?

Jan 12, 2011

I have bought an external usb hard drive on which I back up my three computers every once in a while.Space will quickly be used up.I can't find that little bit of research that I need yesterday.Here is what I would like to find:An application that eliminates doubles in identical files and renames files that have changed by appending the last saved date yyyymmdd to the file name.Does such an application already exist?

View 6 Replies View Related

Ubuntu :: Show Date And Size Of Files During Files Replacement?

Jan 16, 2011

I am newer to Linux ( using Ubuntu 10.04) : I have noticed that during replacement of a file , no date and size of the new and old files are shown in the dialogue box so how to show that ( like the one in windows)

I know that it is easy question , but i really don't know how to do that , by the way I have checked folder preferences and system --> preferences but i did not find something for that

View 9 Replies View Related

General :: Wget / Delete Files / Getting Bunch Of Filefolders, But No Files, Ex."cccamp07-de-1845?

Oct 11, 2010

I am trying to dl the files located here: http://good.net/dl/bd/CCCamp-2007/video/m4v/ using wget.

Now when I use the command wget -r -A .m4v http://good.net/dl/bd/CCCamp-2007/video/m4v/

I get the just a bunch of filefolders, but no files, ex."cccamp07-de-1845-Freifunk_und_Recht.m4v" but its a folder.

View 4 Replies View Related

Ubuntu :: Permissions For My Home Directory Were Accidentally Changed From 'access Files' To 'create And Delete Files?

Nov 25, 2010

the permissions for my home directory were accidentally changed from 'access files' to 'create and delete files', and I changed them back, but ever since then I am not able to change any preferences/settings at all. power management, themes, panels, emerald, anything. my user account is supposed to be the administrator, and all the user privliges are checked. how to get control of my computer back?

View 9 Replies View Related

General :: Possible To Delete All The Files Including System Files As Root?

Sep 21, 2010

If I am logged in as root in a linux system and I run command rm -rf on / folder, should it remove all the files? also the kernel?

View 4 Replies View Related

Programming :: Print Everything After $date?

Feb 21, 2010

Say I have a line like such:

Code:
today 2010 Feb 21 test10, 12AM

How would I print everything AFTER "2010 Feb 21 "?

What I thought to do so far is to set a variable to the format used in the string like so:

Code:
date="$(date +%Y %b %e)"

So I know I have to use either awk, sed, or perhaps bash substrings to work with the variable $date, but as to how, I'm drawing a blank.

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

Software :: How To Get Current Date Log Files

Mar 13, 2011

Currently I'm using `ls -l | grep "Mar 13" ` for listing today log files.Output :-rw------- 1 root root 2188192 Mar 13 10:33 audit.logBut my requirement like below,note permission,date,size...audit.log Note : Where 10 logs file are same directory in different date , But I'm looking files which are logging in today date (Mar 13)

View 2 Replies View Related







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