General :: How To Add 5 Years To Current Date

Mar 17, 2010

I am using Red hat Linux operating system.I want change the date exactly 5 years ago to current date with out providing month, date and time. I want only the year should be 5 years ago .please help in this regard . example . If current date is this = Wed mar 18 22:59:23 IST 2010. past date shuld be like this= Sat Mar 18 22:59:23 IST 2005

View 6 Replies


ADVERTISEMENT

Programming :: Subtracting Years From Current Year?

Feb 24, 2011

I have a script: Code: #!/bin/bash
THEYEAR=2011
LASTYEAR=$(($THEYEAR - 1))
echo $THEYEAR
echo $LASTYEAR I get:

[Code]...

THEYEAR is correct but then I get a line space and then a -1 for LASTYEAR. I can't figure out why.

View 2 Replies View Related

General :: Date - How To Set Current Time

Jun 26, 2011

Why is the output of the following commands different?

root@vmi2115:/var# hwclock
Sun 26 Jun 2011 01:21:38 PM CEST -0.273230 seconds
root@vmi2495:/var# date
Sun Jun 26 15:21:39 CEST 2011
root@vmi2115:/var#

And can I change the current time on Linux?

View 4 Replies View Related

Fedora :: Strip Current Date With SED?

Nov 9, 2009

I have some text based reports in which I would like to strip the "Current Date" from and replace with equivalent number of empty spaces, for every occurrence.For example, here is what I need to strip:

Date: 11/09/09

If I manually run the following SED command, it works great, however I cannot seem to find a way to use the actual "date" command within SED, to get the desired results.

WORKING: sed -i -e 's/Date: 11/09/09/ /' myfile

I've been messing around with various attempts to do this using the "date" command within SED, but I just can seem to get it right. I've also attempted defining variables which call separate "date" commands for day, month, year and inject them via standard variable calling, echoing variable, expanding variable with brackets, etc... Here are a few of the SED command attempts I've tried:

Quote:

sed -i -e 'sate: `date +%D`: :' myfile
sed -i -e "s/Date: `date +%d`/`date +%m`/`date +%y`/ /" myfile
sed -i -e 's/Date: `date +%d`/`date +%m`/`date +%y`/ /' myfile
sed -i -e 's/Date: $(date +%D) / /' myfile

I need to replace it with the equivalent number of spaces, as I'm going to be overlaying a PCL Logo here and need to keep the structure of the rest of the file. Cannot have the remaining portion of the line shifting left.

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

Networking :: Put Current Date And Time On My Machine From Certain URL?

Dec 7, 2010

I am using the Terminal. I would like to know how do I put the current date and time on my machine and the date from a certain URL that has .php extension into a file.

View 3 Replies View Related

Ubuntu :: Show Current Date And Time In Screen Saver

Jan 20, 2011

[URL] While I could follow it: For what I am trying to do, it did not work. how to get it working?

View 8 Replies View Related

General :: Windows OS User For At Least 18 Years?

Aug 4, 2010

I have tried using Linux several times but to be truthful it just seemed to be so complicated when compared to windows OS's That it just never really appealed. The one thing That really annoys me about Linux is that Widows makes it so easy to connect to the internet and even if you run into a problem nearly every Provider offers support for Win users.

My provider BigPond (Australia) Solves all Win OS problems with just a simple phone call, but when I say LInux " Sorry We don't support that system." is the reply. So! My cable modem is supplied by BigPond but when I try to log in using Ubuntu 10.4 : Nothing works. Linux just can't recognise the hardware and no one seems to be able to tell me how you you link Ubuntu to your normal Internet hardware.

Why is it so difficult for Linux users to do what is just a breeze for Windows users. Until Linux can match Microsoft in user friendly competition, it will always run a dismal Last to Windows in any form and Win 7 is just such an easy to use service. So is there anyone out there who can tell me how I get Ubuntu to recognize my Modem and at least get me started?

View 14 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 :: Ubuntu - Been Away From For 10 Years Which Commands Missed?

Jul 9, 2010

I have been away from linux for some years, but now I'm once again back with Ubuntu 10.04. I used to run Gentoo in 2000 and knew my commands, but now that the world of linux has progressed a bit further, aren't there many new commands to learn? Do you know a list of linux shell commands that are in broad use now and which didn't exist 10 years ago?

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

General :: Julian Date Converter To Gregorian Date

Apr 22, 2010

Anyone have a ksh solution to convert julian date to gregorian date?

View 6 Replies View Related

Ubuntu :: VirtualBox On Win 7 With A Setup For Years

Aug 23, 2010

I have VirtualBox on my Windows 7. I have Ubuntu running for years on a 1TB hard drive. I put the hard drive on my Windows 7 and Computer Management see it as "Disk 0" my Windows 7 drive is "Disk 1" The Disk 0 don't have a drive letter. I only see it in My computer manage.How do I get VirtualBox to boot my Ubuntu hard drive that all ready has Ubuntu install and all set up on it?

View 3 Replies View Related

OpenSUSE :: Planning To Return To Suse After A Gap Of Two Years?

Apr 5, 2010

Planning to return to suse after a gap of two years. Is anyone using xephem and gcompris. Or can some one submit the link for how to install of these programmes.

View 3 Replies View Related

Software :: Used Edonkey2000 A Vouple Of Years A Go Until Got To Know Bittorrent

Feb 2, 2011

i used to used edonkey2000 a vouple of years a go until i got to know bittorrent

i installed mldonkey
# aptitude install mldonkey-gui

run, and then what? no servers list.

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

Ubuntu Multimedia :: No Logout System Sound Since Years?

Apr 20, 2010

Since I can remember, Logout sound never plays in Ubuntu, or maybe the problem is Compiz + Gnome. A very similar problem occurs in KDE (Kubuntu), but here the problem is No Login sound.

Gnome + Compiz: Good Login sound, No Logout sound.
KDE: No Login Sound, good Logout sound.

So, what is the problem with Login/Logout sounds in Linux now? I have used the last 4 Ubuntu releases, and Logout sound never plays in Ubuntu(gnome).How could a fix that?

View 1 Replies View Related

Ubuntu Installation :: Kubuntu LTS Software Upgraded Over The 3 Years?

Apr 25, 2010

Is it still true that if I install the LTS version of Kubuntu that I'll be stuck with the versions of software that it comes with? Or, will the versions of the software it comes with be updated during the three years it's good for?

Can I convert my present install of Kubuntu 9.10 to Kubuntu 9.10 LTS by installing Synaptic and clicking on Settings>Updates>Long>term>support>releases>only? I'd prefer using the 10.04 LTS version but not if I'll be stuck with software I can't upgrade.

View 3 Replies View Related

Ubuntu :: Organize Folder With Images By Date Taken Rather Than Date Edited?

Aug 1, 2011

As 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 Related

Ubuntu Multimedia :: Not To Mention Tons Of Bugfixes Since 2.2.0, Which Was Released Almost 3 Years Ago

Mar 4, 2010

I'd like to announce the release of cmus 2.3.0 here. cmus 2.3.0 features gapless MP3 playback, native PulseAudio output plugin (which cures all the problems with PA ALSA emulation present in 2.2.0), very fast metadata cache and much improved compilations handling.

Not to mention tons of bugfixes since 2.2.0, which was released almost 3 years ago.[URL]..

View 1 Replies View Related

Slackware :: Install Module Em28xx In A 12.0 Installation That Has Been Operating For Several Years?

Apr 2, 2010

I've been trying to install module em28xx in a Slackware 12.0 installation that has been operating for several years. This is the em28xx that is part of the Slackware 12.0 distribution itself (kernel 2.6.21.5).

Unfortunately, although em28xx is fine, modprobe has a problem with dependent module i2c-core, which is generating an "Invalid module format" message. The system is using the generic Slackware 12.0 kernel, not the huge kernel.

View 7 Replies View Related

SUSE / Novell :: Sort And Delete Directory Going Back For Years?

Nov 15, 2010

Got directories dated of 2009 2008, What is the best way to ls the directories, sort them by date, redirect the output to a file and then delete them?

View 14 Replies View Related

General :: How To Add A Date

Oct 29, 2010

i 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

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

General :: How To Use The Date Command

Jun 15, 2010

How to use the date command to display, for example, 10-Mar-2010 01:01:53? What's the format string?

View 2 Replies View Related

General :: Changing The Date IST To GMT?

Jun 19, 2011

Somehow during a recent ubuntu install I managed to set my clock to Indian Standard Time instead of Greenwich Mean Time. Now I'm having problems acessing some websites and I think it's because the certificates appear to be off date.

View 2 Replies View Related

General :: Put The Date In The Name Of File But Can't Seem To Get?

Apr 11, 2011

I'm trying to put the date in the name of my file but cant seem to get it I just end up with the word date in the file instead of the date. my script looks like this.

#!/bin/bash
x="/var/log/system/"
y=date
z=${y:11:8}
top > $x$y.txt

View 3 Replies View Related

General :: How To Know System Up-to-date

Nov 29, 2009

I have SLES 11 and activated the daily updates.

But i don't know if the system :dowloads the updates
if the downloaded updates are immidiately installed
some updates need to reboot the system. does it automatically reboot or
does he(the system) inform me ? (where ?)

View 2 Replies View Related

General :: Get The Days From A Certain Date?

Dec 11, 2010

calculating days' distance´╝č

for instance,

Code:
( 2010-9-16 ) minus (2010-9-1) = 16 days

I have read the date manual

View 4 Replies View Related

General :: Mkdir With The Date

May 25, 2010

How do I make a directory with the date in this format:

YYYYMM
201005

View 2 Replies View Related







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