Help with rysnc and find with date variable


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help with rysnc and find with date variable
# 1  
Old 12-21-2011
Help with rysnc and find with date variable

I want to have a script to create directory labled with the date, convert a load of flac files to mp3 and then find and rysnc the newly created mp3 file to the dated directory. Here's what I have done so far but the rsync command doesn't work:
Code:
#!/bin/bash
#set date variable as now
DATE=`/bin/date +%y%m%d`

#create dir for DATE
mkdir /media/raid10/music/newmp3/$DATE

#run flac2mp3
/media/raid10/music/flac2mp3_wPics/flac2mp3_wPics/flac2mp3.pl /media/raid10/music/flac /media/raid10/music/mp3

#copy new mp3 to DATE directory
rsync `find /media/raid10/music/mp3 -type -f -iname "*.mp3" -atime $DATE` /media/raid10/music/newmp3/$DATE

Any help would be greatly appreciated!!
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to replace a parameter(variable) date value inside a text files daily with current date?

Hello All, we what we call a parameter file (.txt) where my application read dynamic values when the job is triggered, one of such values are below: abc.txt ------------------ line1 line2 line3 $$EDWS_DATE_INSERT=08-27-2019 line4 $$EDWS_PREV_DATE_INSERT=08-26-2019 I am trying to... (1 Reply)
Discussion started by: pradeepp
1 Replies

2. UNIX for Beginners Questions & Answers

Script to find a date variable and increment it

Hi, I have parameter file wo_location.prm which has a date variable $last_upd_date= 02032016. I need to write a unix shell script to find that variable and increment it by 1 day. The path to the file is root/dir_lc/shared/param/wo_location.prm and the variable is $last_upd_date. Any... (2 Replies)
Discussion started by: isenhiem
2 Replies

3. UNIX for Dummies Questions & Answers

Find the count of files by last created date based on the given date range

My unix version is IBM AIX Version 6.1 I tried google my requirement and found the below answer, find . -newermt “2012-06-15 08:13" ! -newermt “2012-06-15 18:20" But newer command is not working in AIX version 6.1 unix I have given my requirement below: Input: atr files: ... (1 Reply)
Discussion started by: yuvaa27
1 Replies

4. Shell Programming and Scripting

Convert a date stored in a variable to epoch date

I am not able to pass date stored in a variable as an argument to date command. I get current date value for from_date and to_date #!/usr/bin/ksh set -x for s in server ; do ssh -T $s <<-EOF from_date="12-Jan-2015 12:02:09" to_date="24-Jan-2015 13:02:09" echo \$from_date echo... (7 Replies)
Discussion started by: raj48
7 Replies

5. Shell Programming and Scripting

Find week of the year for given date using date command inside awk

Hi all, Need an urgent help on the below scenario. script: awk -F"," 'BEGIN { #some variable assignment} { #some calculation and put values in array} END { year=#getting it from array and assume this will be 2014 month=#getting it from array and this will be 05 date=#... (7 Replies)
Discussion started by: vijaidhas
7 Replies

6. UNIX for Dummies Questions & Answers

compare two directories after rysnc

Hi, I ran rsync command to copy all files, directories and subdirectories from /home/dir1 to another Target directory /home/dir2 Now I want to make sure everything is copied over without missing anything. Is there a command I can run which will compare both directories and check to see if I am... (4 Replies)
Discussion started by: tkhan9
4 Replies

7. UNIX for Dummies Questions & Answers

rysnc

hi I have a rsync working between two servers but i would like to write this to a daily log on completion to a area on one of the servers. This way i can check if sync was successful easily. Rsync i am running is as follows rsync -aWv -e ssh --stats progress --delete --ignore-errors... (2 Replies)
Discussion started by: treds
2 Replies

8. OS X (Apple)

bizar rysnc problem

Hi all, i'm syncing two raid sets together using "rsync -avE --delete" i build the two raid sets identical to each other using storenext , however when i let the script run a couple of times my destination is about 300 GB larger then my source. i run the command as root on a 10.5.6 Xserve and... (2 Replies)
Discussion started by: wessel
2 Replies

9. UNIX for Advanced & Expert Users

date issue-find prevoius date in a patricular format

Hi , I have written a shell script that takes the current date on the server and stores it in a file. echo get /usr/home/data-`date '+%Y%d'`.xml> /usr/local/sandeep/GetFILE.ini I call this GetFILE.ini file from an sftp program to fetch a file from /usr/home/ as location. The file is in... (3 Replies)
Discussion started by: bsandeep_80
3 Replies
Login or Register to Ask a Question
BURN(1) 							       Burn								   BURN(1)

NAME
burn - record from various sources to optical media (CD, DVD) SYNOPSIS
burn MAIN_MODE [OPTIONS]... [FILE/S]... burn --help DESCRIPTION
CD-writing program/script. Features Data-CD, Audio-CD, Copy on the fly, Iso-CD. CONFIGURATION
Configuration files for burn are: ~/.burnrc or /etc/burn.conf. You can edit them to change values. If you don't have these files you can: 1. use burn-configure utility 2. take the configuration template, edit and copy it as ~/.burnrc or /etc/burn.conf MAIN MODES
-D, --data-cd To create Data-CD -I, --iso-cd To create ISO-CD -C, --copy-cd To copy CDs -A, --audio-cd To create an audio CD from WAV, MP3 and ogg files EXAMPLES
# burn -D -p /etc/ Creates a CD with /etc/ contents. (you will find files and directories contained in /etc in CD's root.) # burn -D -p /home/bigpaul/video/summer_2003/spain.tar.gz Creates a CD with spain.tar.gz in CD's root # burn -D -r /etc/ Creates a CD containing the whole /etc/ directory. (-r preserves path) # burn -D -c /mail_2003 /home/bigpaul/Mail -p /boot/vmli* Creates a CD containing the whole /home/bigpaul/Mail renamed into /mail_2003. (-c changes path name). This command also adds in CD's root every vmli* file in /boot/ directory # burn -I -n image.iso Burns image.iso # burn -C Copy CDs (disk at once). # burn -A -a *.wav Creates an Audio CD. Tracks come from wav files # burn -A -a *.mp3 Creates an Audio CD. Tracks come from mp3 files # burn -A -a *.ogg Creates an Audio CD. Tracks come from Ogg Vorbis files # burn -A -a *.mp3 file.ogg track01.wav Creates an Audio CD preserving input order. In this example the first audio tracks will come from mp3 files, than we will find the one from file.ogg and finally the one from track01.wav GENERAL OPTIONS
-s, --simulate to perform a burn simulation DATA-CD OPTIONS -p, --path add file/s or path's content to CD-ROM's root. e.g.: -p /cvs/myproj/. In this example we will find CD-ROM's root filled with /cvs/myproj/ contents, but no /cvs/myproj/ will be created -r, --preserve-path add file/s or path's content to CD-ROM preserving original path. e.g.: -r /cvs/myproj/. In this example we will find /cvs/myproj/ in CD-ROM's root -x, --exclude-path every file or directory matching this string will not be included -c, --change-path old_path will be named new_path in CD-ROM. e.g.: -c /my_home/2004_Jan/ /home/bigpaul/. Thus /home/bigpaul/ will be named /my_home/2004_Jan/ in CD-ROM. -l, --follow-symlink this option allows burn to follow symbolic link directories -m, --multisession this option allows multisession CDs ISO-CD OPTIONS -n, --name image name AUDIO-CD OPTIONS -a, --audio-file mp3, ogg or wav file/s AUTHOR
Ben Finney <ben+python@benfinney.id.au>, Gaetano Paolone <bigpaul@hacknight.org> COPYRIGHT
This is free software: you may copy, modify, and/or distribute this work under the terms of the GNU General Public License, version 2 or later as published by the Free Software Foundation. No warranty expressed or implied. See the source for details. 2009-07-22 BURN(1)