Yes you are probably correct, creation date would probably be the best.
@Don Cragun
Thanks for your advice, unfortunately most of it is completely over my head - hence why I post on here for help - I am not an IT professional
The idea is that a pdf will be produced by front-of-house staff from a word document that is populated from an MS Access application using a virtual cups-pdf printer on my ubuntu server. The pdf will then need to have the characters added by the pdf printer removed, the creation date added and moved to a new directory. From the new location the pdf will be edited by a user (me) on a tablet pc (probably an iPad) and then attached back to the MS Access record. I was planning to run the script that alters the pdf filename every 30secs or so as a cron job from a unprivileged user home directory. Hopefully this all makes sense?
I am open to better suggestions if you have any
Thanks
OK. Back to basics:
1. Will all of the files you want to rename be in the same directory? If so, what is the name of that directory? If not, what are the names of all of the directories that will contain pdf files you want to rename?
2. What is the name of the directory where you want to place the renamed pdf files?
3. When you run the command:
what is the output?
If you want a script to run every 30 seconds, cron won't be sufficient; its finest granularity is 1 minute. And, if the system is busy, you could end up having two copies of your script running at the same time. If you run a script to rename files every few minutes after a file is converted, the likelihood that the current date and the file's creation date are different is pretty low (especially if the front end people who create the pdf files don't work between 11pm and 1am).
How do I write the command to find all files with any lower case letters in the filename? I have tried
find . -name *\(a-z\) and a lot of combinations like that, without success.
thanks
JP:confused: (4 Replies)
Hi,
I need to write a small script to search in some specific directories to check if any file is present with a unix command name...
Means if the directory contains any files like cat, vi, grep, find etc i need to list those files into a file.
Please help
Thanks,
D (6 Replies)
Hi,
I am having set of files whose names are stored in a file say "filelist.txt"
Now, I want to find all files contained in "filelist.txt" from my parent directory.
Is there any way to let find command understand "filelist.txt" just like we have option -f in awk.
I donot want to run a... (4 Replies)
Hi, guys, I'm not a high-end programmer, but I've been trying to write a script to remove all of the b.rtbn2.cn (and b.adserv.cn and any future variation) injected script tags on the server. (Still working on security fixes to prevent it in the future, just need to clean up now.)
My approach is... (1 Reply)
Hi Gurus,
Do any kind souls encounter have the same script as mentioned here.
Find and compare filenames in different mount point and remove duplicates.
Thanks a million!!!
wanna13e (7 Replies)
I have the following code:
find /usr/local/test5 -type f -mtime +30 -exec ls -l {} \; | awk '{print $5, $6, $7, $8, $9}'
I have this as output:
14 Aug 12 00:00 /usr/local/test5/file1
14 Aug 12 00:00 /usr/local/test5/lastname,
The bolded part is where I run into trouble. The actual... (4 Replies)
I have input file called file1 with characters that have \\ in it.
I cannot change input file, because it is generated earlier in script.
Now would like to replace string on line in file called bfile with output from file1
I have been using sed command.
$cat file1
pc//6sPxp==
$ cat scr1... (4 Replies)
I have a group of files in different directories with characters such as " ? : in the file names. How do I find these files and remove these characters on mass?
Thanks (19 Replies)
Hi,
Can anyone let me know the command to know the list of filenames that have string 31 in their 4th and 5th positions inside the file:
grep -l "31" main*.txt
The above grep lists all the files which have 31 at any position but I want filenames having 31 at position 4 and position 5. (8 Replies)
Hi,
How to change the filenames with timestamp in sub folders
I have the following code to select the records.
find . -type f -name '*pqr*' -ctime 1 -print
The following is the example
app_root_dir="/`echo $ScriptDir | cut -d'/' -f2`"
$app_root_dir/../BadFiles directory
uvw.bad... (3 Replies)
Discussion started by: bobbygsk
3 Replies
LEARN ABOUT MOJAVE
cupsfilter
cupsfilter(8) Apple Inc. cupsfilter(8)NAME
cupsfilter - convert a file to another format using cups filters
SYNOPSIS
cupsfilter [ --list-filters ] [ -D ] [ -U user ] [ -c config-file ] [ -d printer ] [ -e ] [ -i mime/type ] [ -j job-id[,N] ] [ -m mime/type
] [ -n copies ] [ -o name=value ] [ -p filename.ppd ] [ -t title ] [ -u ] filename
DESCRIPTION
cupsfilter is a front-end to the CUPS filter subsystem which allows you to convert a file to a specific format, just as if you had printed
the file through CUPS. By default, cupsfilter generates a PDF file. The converted file is sent to the standard output.
OPTIONS --list-filters
Do not actually run the filters, just print the filters used to stdout.
-D Delete the input file after conversion.
-U user
Specifies the username passed to the filters. The default is the name of the current user.
-c config-file
Uses the named cups-files.conf configuration file.
-d printer
Uses information from the named printer.
-e Use every filter from the PPD file.
-i mime/type
Specifies the source file type. The default file type is guessed using the filename and contents of the file.
-j job-id[,N]
Converts document N from the specified job. If N is omitted, document 1 is converted.
-m mime/type
Specifies the destination file type. The default file type is application/pdf. Use printer/foo to convert to the printer format
defined by the filters in the PPD file.
-n copies
Specifies the number of copies to generate.
-o name=value
Specifies options to pass to the CUPS filters.
-p filename.ppd
Specifies the PPD file to use.
-t title
Specifies the document title.
-u Delete the PPD file after conversion.
EXIT STATUS
cupsfilter returns a non-zero exit status on any error.
ENVIRONMENT
All of the standard cups(1) environment variables affect the operation of cupsfilter.
FILES
/etc/cups/cups-files.conf
/etc/cups/*.convs
/etc/cups/*.types
/usr/share/cups/mime/*.convs
/usr/share/cups/mime/*.types
NOTES
Unlike when printing, filters run using the cupsfilter command use the current user and security session. This may result in different out-
put or unexpected behavior.
EXAMPLE
The following command will generate a PDF preview of job 42 for a printer named "myprinter" and save it to a file named "preview.pdf":
cupsfilter -m application/pdf -d myprinter -j 42 >preview.pdf
SEE ALSO cups(1), cupsd.conf(5), filter(7), mime.convs(7), mime.types(7), CUPS Online Help (http://localhost:631/help)
COPYRIGHT
Copyright (C) 2007-2017 by Apple Inc.
11 June 2014 CUPS cupsfilter(8)