General :: Get The Days From A Certain Date?
Dec 11, 2010calculating days' distance?
for instance,
Code:
( 2010-9-16 ) minus (2010-9-1) = 16 days
I have read the date manual
calculating days' distance?
for instance,
Code:
( 2010-9-16 ) minus (2010-9-1) = 16 days
I have read the date manual
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 RelatedI'd like to tweak my Conky so it automatically displays the days of the week correctly. So for example, if TODAY were Tuesday, it would look like this:
Tuesday
Wednesday
Thursday
Friday
[etc.]
And then tomorrow, *automatically*, it would look like this:
Wednesday
Thursday
Friday
[etc.]
I know I can get it to display *today's* date like this:
${time %A}
But how do I get it to display tomorrow's date?
I am trying to update using Update Manager and I get this message: Failed to fetch "Failed to fetch [URL]..404 Not Found" My system is 64 days out of date now.
I have looked elsewhere for an answer and some others have had similar problems, but I have not found a reason for it happening, nor an answer. I wonder if anyone can help me please. I have been using Ubuntu for several months, can use the Terminal if I have the right commands to issue, but beyond that have limited knowledge of the system.
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 RelatedAnyone have a ksh solution to convert julian date to gregorian date?
View 6 Replies View Relatedwe have requirement like we need to run the sql script, which needs to be executed for every 45 days.
View 1 Replies View RelatedI am using awstats for my website report . but last 3 days i am not using awstats . now i check awstats,, when i give updatenow then it only shows todays report , we cant find last 3 days report.
View 1 Replies View RelatedI have searched for a way to copy file less than X days old and I found this:http://www.howtogeek.com/howto/ubunt...days-on-linux/ The syntax for deleting files less than 7 days old would be like this:find /path/to/files* -mtime -7 -exec rm {} ;I would like to copy the files to mntas, and I'm not sure what the syntax should be.ould this work?find /path/to/files* -mtime -7 -exec cp {} mnt
as ;
i am a newbie in linux ,i am writing a bash script to identify the files which are exactly 7 days ( a week old) i tried this command find /var/backup -mtime +7 -exec ls -d {} ;but this gives me even the files which are older than 7 days
[root@proxy access]# find . -mtime +7 -exec ls -d {} ;
./access.log.1.gz
./access.log.2.gz
[code]...
i have been trying to figure out wine and iso mounting for like 3 days i need a step by step guide on how to do this the things i need to mount are in /home/patches/downloads/diablo 2 full game with expansion and thats the folder in which the iso files are in and first i need to mount "diablo 2 install disk.iso" and im using linux helena or thats what it's called on the boot menu
View 7 Replies View RelatedI am getting below message daily in RHEL 5.5 for certificate renewal. Can someone help the way of renewaling this
######################################################
On Wed, 15 Dec 2010 13:11:04 +0800, Root <root@miniserver.net> wrote:
> ################# SSL Certificate Warning ################
[code]....
Actually i want to know if i don't want any support or software update from redhat, can i continue to use RHEL after 30 days evaluation ?
View 3 Replies View RelatedI am trying to put together ksh shell and I am new with writing scripts.How do you write a command to delete any files if it's 30 days old and also it's not currently being locked?
View 10 Replies View Relatedfind -type f /path/* -mtime +7 -exec rm {} ;Is this the best way to delete only files (not directories) within /path that are older than 7 days? or is there a better way?
View 3 Replies View RelatedI am writing a bash script which includes the find (and rm command with exec) command the options -mtime -15 or +15 so that files older 15 days must be deleted from the home directory. I think that -mtime +15 should be ok, but in which case does the option -mtime -15 really come in handy?? go back 15 days until today's date?
View 1 Replies View RelatedWe have one ftp server. Number of users are using it remotly. My requirement is that suppose any user is not connecting to the server using FTP for 15 days then account should get expired/locked automatically. Is it possible?
View 2 Replies View RelatedI'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 RelatedAs 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 RelatedCommand to find all of the files which have been accessed within the last 30 days?
View 1 Replies View Relatedim trying to collect some data. Is there a way to get the free memory stats over the past few days from some file... i looked into the sar log files but they dont have date stamps in them!
View 6 Replies View RelatedI`m totally new to linux, in fact I`m a windows adminscenario:I need to run a script that will automatically move 30 days old files from particular folder to a particular folder.
View 3 Replies View RelatedWhere/how do I set the retention on system logs to a minimum of 180 days? Further, where do you set password failure enforcement policies?
View 1 Replies View RelatedI have a directory there are many files are writing to it , I would like to write a script to do that , can please provide the advise .
archive all files to one single file in every 30 days , and then remove these old files .
I have been trying to write a script that will take a directory, for example /accounts compress it into a .tar file with the filename containing the date of compression, for example accounts030210.tar and then place that file into a directory called /archive
I also want the script to delete files in /archive that are older than 7 days.
I want to make the script to copy all folders which older than 7 days from Linux server to Windows server by Samba. And make it automatically by using cron
View 4 Replies View RelatedI am having my own testing server in which mySQL database will be backed up daily. in the format mysql_backup_dd/mm/yy.tar.gz in my home folder I need to setup a cron job to delete the backups older than 7 days.how to do this.
View 3 Replies View RelatedI'm trying to truncate a postfix Maildata directory for one of our users. I want to be able to move any files older than <n> days to a new location, but also copying the relevant directory structure. This should be doable in the one comman. I've used find to locate the files, and mv to move them, but I can't figure out how to build the directoryt structure on the fly in the new location.
This is what I have so far:
Code:
find /Maildata/editor -mtime +42 -type f -exec mv -v {} /EditorEmailOld/ ; > ~/editor.txt
I want to run rsync on server A to copy all files from Server B when they are newer than 7 days.(find . -mtime -7) I don't want to delete the files on Server B.
View 2 Replies View Relatedi have a line in a script that puts some text into a fileecho "Couldn't find this at this time" >>/var/cccamlog/cccam.checkthis work ok but i would like to have the time printed auto co what do i have to do to the line to do it?"Couldn't find this at this time 10-10-2010 08:05pm
View 10 Replies View Related