I can do simple file renaming but this task is slightly more troublesome
Ive got a guy that gives me multiple .pdf filles in a directory named
something like
3412345.pdf
4565465.pdf
8534534.pdf
And he also gives me a html file which is tabled with which shows the filenames above and the titles.
E.G
England|SolarPanels roof|3412345.pdf
Scotland|SolarPanels Garden|4565465.pdf
Ireland|SolarPanels Wall|8534534.pdf
What I want to do is rename all of the files in the directory to match the titles so I want to rename
3412345.pdf to SolarPanels roof.pdf
4565465.pdf to SolarPanels Garden.pdf
8534534.pdf to SolarPanels Wall.pdf
Is there a way I can do this in a shell script which would be quick n easy?!! I can create a .txt file or whaever is needed to be read as input
Any help would save me a lot of time
Hello messiah1,
Could you please use code tags for commands/codes/Inputs in your posts as per forum rules, following may help you in same.
Can someone please tell me how I can rename a bunch of files at a time. I hava a directory that has 700+ files that are named
*.xyz and I would like to rename them to *.abc . How can I do that with a simple command ?
mv *.xyz *.abc did not work.
Thanks in advance (4 Replies)
hi,
I've a machine running RHEL3,kernel version 2.4.
i need to rename multiple files under one directory as follows:
ls
demo.c demo.S demo-1243.sw demo.xyz
and now i need to replace the occurrence of demo with demo_1 for each of the above file. the tedious way is to go ahead and do mv on... (2 Replies)
Hi All,
I have a number of files in a directory that I would like to rename - I am quite aware that you can use the mv command to rename the files - I would like to rename them automatically from the command line instead of having to do them singly. I have searched the forum pertaining to... (4 Replies)
Hello
i have the files in this format
pdb1i0t.ent
pdb1lv7.ent
pdb1pp6.ent
pdb1tj2.ent
pdb1xg2.ent
pdb2b4b.ent
pdb2ewe.ent
Now i have to remove the prefix pdb from all the files and also i need to change the extension of .ent to .txt
The new file should look like this
... (3 Replies)
Hello Everyone,
I am using the korn shell.
I was hoping to find a set of commands to count files in a directory.
I am using:
ls /home/name/abc* | wc -l
This command works fine when a file matches abc* (returns only the file count) , however when no file(s) are found I get... (2 Replies)
I have file1 and file2
I lookup field3 from file2 in field1 of file1 and if there is a match, output field 2,3,5 from file2.
I now want to add field2 of file1 in the output.
I suspect what I have to do is read the entire line of file1 into a 2 dim array? pls help.
here is my code:
... (9 Replies)
Hi
I have a file with filename as "partition-setup-and-ipl.vtcmd.76217657132.9721536798"
Now i need to move this file as "partition-setup-and-ipl.vtcmd.76217657132.9721536798_org"
i tried with
# ls | grep -E "partition-setup-and-ipl.vtcmd.+"... (2 Replies)
Hi all,
Newbie here. First of all, sorry if I made any mistakes while posting this question in terms of rules. Correct me if I am wrong. :b:
I have a .dat file whose name is in the format of 20170311_abc_xyz.dat. The file consists of records whose first column consists of multiple dates in... (2 Replies)
I have file1 and file2
I lookup field3 from file2 in field1 of file1 and if there is a match, output field 2,3,5 from file2.
I now want to add field2 of file1 in the output.
I suspect what I have to do is read the entire line of file1 into a 2 dim array? pls help. (1 Reply)
Greetings!
I have a quick question which must be deferred to those with greater skill than myself :)
In this situation, I wish to create a list of all the files on an entire partition in descending order sorted by date. I tried numerous switches for ls, and found this line to be the closest... (4 Replies)
Discussion started by: LinQ
4 Replies
LEARN ABOUT DEBIAN
pdfclean
PDFCLEAN(1) General Commands Manual PDFCLEAN(1)NAME
pdfclean - pretty print, decompress and garbage collect PDF files
SYNOPSIS
pdfclean [options] input.pdf [output.pdf] [pages]
DESCRIPTION
pdfclean pretty prints and rewrites the contents of a PDF file. If no output file is specified, the new file will be written to "out.pdf"
in the current directory.
OPTIONS -p password
Use the specified password if the file is encrypted.
-g Garbage collect objects that have no references from other objects. Give the option twice to renumber all objects and compact the
cross reference table. Give it three times to merge and reuse duplicate objects.
-d Decompress streams. This will make the output file larger, but provides easy access for reading and editing the contents with a text
editor.
pages Comma separated list of ranges to clean.
SEE ALSO mupdf(1), pdfdraw(1). pdfshow(1).
AUTHOR
MuPDF was written by Tor Andersson <tor@ghostscript.com>. MuPDF is Copyright 2006-2010 Artifex Software, Inc.
September 4, 2011 PDFCLEAN(1)