Questions tagged [batch]

Questions about batch-processing - how to apply the same procedure to a lot of files/objects.

This should not be used for questions about converting DOS/Windows batch files.

147 questions
873
votes
8 answers

How can I recursively delete all files of a specific extension in the current directory?

How do I safely delete all files with a specific extension (e.g. .bak) from current directory and all subfolders using one command-line? Simply, I'm afraid to use rm since I used it wrong once and now I need advice.
user216038
  • 8,733
  • 3
  • 12
  • 4
81
votes
1 answer

How to crop borders/white spaces from image?

I have a lot of images which have white borders around them. I would like to crop those borders all at once, preferably from command line. I believe that it can be done with ImageMagick, but I couldn't find suitable command. I know that it can be…
Rafal
  • 1,787
  • 4
  • 20
  • 29
66
votes
5 answers

How to create multiple files with the Terminal?

I've been learning to program with a really cool introductory book to C and I write off every example and task so I can learn the syntax by heart. I did every file manually until now, but the clicking, naming and saving gets exhausting. I need a…
deranor
  • 763
  • 1
  • 6
  • 5
63
votes
8 answers

Batch processing tif images? Converting .tif to .jpeg

I'm trying to mass convert a handful of .tif files. I found phatch could look like a good candidiate but I'm running Ubuntu 11.04. Looks like they don't have a .deb for my version. Anyone have any alternatives to phatch or any other recommendations…
chrisjlee
  • 10,716
  • 14
  • 45
  • 51
50
votes
8 answers

How can I compress images?

I have 5,000 images which I need to compress (to display on my website). I am new to Ubuntu. So what do I do?
user2950593
  • 667
  • 2
  • 7
  • 9
38
votes
3 answers

Batch convert H.265 mkv to H.264 with ffmpeg to make files compatible for re-encoding

I have H.265 encoded files that are so resource intensive they don't play well and my conversion software (mencoder) doesn't (currently) support the H.265 format. Can I convert them to H.264 in a command line batch file to rapidly convert the files…
TheMegolith
  • 951
  • 1
  • 7
  • 13
33
votes
3 answers

How to get/edit EXIF meta-data of multiple images?

I ran into big problem yesterday night. I took out my old digital camera, and started using it without setting current date and time. All photos clicked now have date as Jan 01, 2009 I want to change the date and time (and other EXIF image…
I-M-JM
  • 555
  • 1
  • 5
  • 7
32
votes
3 answers

How do I create a batch file and run it?

should I use the text editor? the extension should be .sh or .bat?
Sange
  • 321
  • 1
  • 3
  • 3
31
votes
4 answers

Remove only 1st page from a LOT of pdf files

That's all I have to do: remove only 1st page from a LOT of pdf files... Please tell me that magic exists.
Pitto
  • 1,938
  • 6
  • 20
  • 35
29
votes
1 answer

Is there a command line tool to bulk extract images from a pdf?

I have a pdf catalog that was given to me from a client in pdf format. They don't have the images but they're in the pdf. Is there a way to extract all images from a pdf using a command line tool while preserving it's original file names? I reviewed…
chrisjlee
  • 10,716
  • 14
  • 45
  • 51
29
votes
5 answers

How to batch convert .doc or .docx to .pdf

I need to batch convert a set of .doc or .docx files to .pdf in terminal, not using a GUI. It would be helpful if I could batch-process multiple files. I would also like to maintain as much meta-data as possible.
Ringtail
  • 16,011
  • 12
  • 60
  • 183
24
votes
5 answers

How to convert all pdf files to text (within a folder) with one command?

I know that I can convert pdf files to text files one by one like this : $ pdftotext filename.pdf But is there a single command that would make that conversion without specifying separate file names so as to convert them all? I see here, on…
user47206
15
votes
3 answers

Is there a way to make a file that would run a terminal command when you click it?

Is there a way to make a file that would run a terminal command when you click it? Similar to a .bat extension in windows?
Chaos
  • 803
  • 2
  • 9
  • 17
14
votes
1 answer

How to decode an image string using base64 in command line?

Say I have an image image1.jpg I can encode it using base64 tool : myImgStr=$(base64 image1.jpg) I tried to decode it using the following command: base64 -i -d $myImgStr > image2.jpg or echo -n $myImgStr | base64 -d -i > image2.jpg But in both…
user545149
14
votes
4 answers

Moving large amount of files (~ 100 000)

I work with folders that contain a lot of files, like 100 000 or even 1 000 000 files per folder. When I try to move the content of a folder into another, my computer always gets stuck. Even when the process seems finished, I can't see the content…
Hyperion
  • 243
  • 2
  • 5
1
2 3
9 10