Fedora :: Create Filenames Using The Date
May 5, 2010
I am currently working on a script which makes regular backups of some data I have, and I would like to name the compressed TAR files with the date it they were created, in short I want to rename a file:
OriginalName.tar.gz --> AnotherName-30-05-2010.tar.gz
Is there an easy way I can accomplish that? How?
View 14 Replies
ADVERTISEMENT
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
Nov 26, 2010
Is there a way to automatically append date to the filenames of the photos imported using shotwell or f-spot?
View 9 Replies
View Related
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
Jun 30, 2010
I have an old game, and I want to back up the disk because its old and a little scratched. I tried to use dd to record the disk, but it crashes with an "i/o error", which is strange because I can read the files on the cd without any problem.Luckily, I found all of the files from the disk already backed up on my hard drive. The problem is, when I create an iso image using mkisofs it abbreviates all of the filenames... which makes the game not... run. So how do I create an iso image with long filenames?
View 7 Replies
View Related
Jan 17, 2010
i am running into few problems with the script here. I have an FTP server, all configured, and i need to have a script that will create a folder with current dated within a tree as soon as particular user logs in. I was wondering if that is possible with proftpd. if not, can someone suggest how to create a script that will simply create a DIR with date and autorun itself every 24 hours? i am running Debian/Proftpd with Mysql authorization.
View 14 Replies
View Related
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
Dec 1, 2009
I got a filename called like this:
beach---------20090808-110000.ogg
beach---------20090808-120000.ogg
It's like this:
name----------YYYYMMDD-hhmmss.ogg
Now Im splitting these hourly files into 1 minute files. I get then this output sofar properly:
beach---------20090808-110000_00.mp3
beach---------20090808-110000_01.mp3
beach---------20090808-110000_02.mp3
and so on....
the 00, 01, 02 and up are the minutes it has splitted it. Now I need a script, after it did this, to rename the file names into this:
beach---------20090808-110000.mp3
beach---------20090808-110100.mp3
beach---------20090808-110200.mp3
beach---------20090808-110300.mp3
View 4 Replies
View Related
Dec 6, 2010
i need to create script to make directory with the current date example : the directory name is " 060122010,1100" or near to that format
View 3 Replies
View Related
Apr 21, 2011
I'm trying to write a script which will take mysqldump from a server and put it in a directory with today's date. Here's the script i've written so far:
Code:
#!/bin/sh
BACKUP=/data/backup/sql2/new_backup/daily
cd $BACKUP
mkdir `date '+%m%d%y'`
[Code]....
I want to put the mysql dump in the today's directory. How can i declare this?
View 3 Replies
View Related
May 26, 2011
Is there any other short/easier and smarter way to do the following in Linux? code...
I need to use crontab to create folders every day and every month inside /home/abcd/dammi, /home/abcd/harrami, /home/wxyz/dammi and /home/wxyz/harrami. Can anyone help me with this?
View 2 Replies
View Related
May 22, 2010
I'm working on changing some badly named files, lots of them. I have a little script I use to change uppercase to lowercase:
[Code]....
Bear in mind all these files have appropriate numbers in the front of each filename. I need help to change ONLY the first letter after each underscore to an uppercase letter. I'm sure this can be done but I've done so much searching in forums and with Google/linux until I'm scrambled.
View 2 Replies
View Related
Jul 14, 2011
I'm trying to create a script that will look for a "filename" under /etc/, date stamp the file and copy it to /var/www/upload
View 5 Replies
View Related
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
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
Apr 22, 2010
Anyone have a ksh solution to convert julian date to gregorian date?
View 6 Replies
View Related
May 24, 2010
What is the path to date?
I can't remember and can't find it anywhere with google or with the search here.
View 2 Replies
View Related
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
May 26, 2010
Is there any easy way to do this from within yum? Maybe by enabling a repository for that file or some such? Would like to keep up to date with wine releases.
View 4 Replies
View Related
Aug 18, 2011
I have Fedora 15, with gnome and KDE core because I want to use Dolphin. The language of the OS is English so it shows dates in mm/dd/yyyy format. How can I get it to show dd/mm/yyyy or another format?
View 9 Replies
View Related
Sep 2, 2009
I have a list of .jpg files from two cellphones that I would like to rename to the file creation date... but so far I can't seem to find a suitable script (or anything remotely close to what I need).
These are jpg's snapped on cellphone cameras, so no EXIF data exists.
View 4 Replies
View Related
Oct 31, 2009
How do I get the day of the week and the date to show with the clock on the lower right of the desktop,
View 9 Replies
View Related
Dec 3, 2009
How do I know the time and date of a file downloaded from the net. Is it possible at all? If I want to know when the downloaded file such as a text file was created ie written by the author if not mentioed at all in the entire document. The command I use locally to know file creation time is given below.
Code:
ls -l filename.txt
-rw-r--r-- 1 root root 691 Dec 3 11:12 filename.txt
View 2 Replies
View Related
Jul 10, 2011
In the past, I just edited the /usr/share/gnome-shell/js/ui/dateMenu.js file to alter the date and time format. Today when I tried that, it crashed GNOME Shell and wouldn't let it start..
View 4 Replies
View Related
Aug 7, 2011
For some reason, thunderbird uses some random order for the date elements, e.g. MM/DD/YY. I need to change it to YYYY/MM/DD but haven't found where! There is no option in TB to configure this so I guess it just picks some default from regional settings? Where do I need to go to set the date format to its logical form?
View 3 Replies
View Related
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
Apr 17, 2010
I often record music from the webradio with Streamtuner.How can I rename the mp3 files recorded in a way that numbers are added to the beginning of the filename representing the order in which the titles were played on the webradio station?I am looking for an automated solution like a renaming tool since there are usually hundreds of files in a directory. I used autorename / ARen for windows back in the day when I was still on XP. What I could do with the tool was:a) Sort the files by date of creationb) add an increasing number at the beginning of the filename based on the position in the sorted list.
View 3 Replies
View Related
Jun 11, 2010
I saw a reference to a way to do this while searching for help with something else but don't remember where it was now. I know it is possible to make a local repository but that seems more for someone with a home network composed entirely of Fedora machines than what I'm looking for.In Ubuntu I could just copy the contents of the /var/cache/apt/archives directory and paste the debs into the new installation to be installed once the update manager saw that there were updates. I looked through the contents of the /var/cache/yum directory but I didn't see anything that looked like it would allow me to do this in Fedora. All I want is a way to download whatever updates I need (and there are 300mbs of updates from a fresh install) one time to allow me to catchup and now be waiting hours on my slow 700k connection to download everything.
Could someone point me to an easy to follow HOWTO that would walk me through creating a service pack of the basic default applications for Fedora 13 that will need to be installed or updated on any system?
View 6 Replies
View Related
Mar 2, 2011
I want to make one Fedora 14 as server that have Date and Time as normal. Is there any to make other fedora 14 get Date and time from that Fedora 14 server
View 9 Replies
View Related
May 26, 2011
I upgraded from fedora 14 to fedora 15 yesterday. I live in India (IST) which is GMT +05:30. Every time I boot, my system clock increases its time by 5 and a half hours. For example, system clock on my machine is now Wednesday May 26,2011 22:44. If I were to reboot now, the time I would get is Thursday May 27, 2011 04:14. How do I correct this?
View 14 Replies
View Related