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.

153 questions
935
votes
10 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
  • 9,353
85
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,837
69
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
  • 793
  • 1
  • 6
  • 5
64
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…
58
votes
9 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?
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…
35
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
  • 351
34
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…
33
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…
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,978
31
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,285
26
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
2 answers

Run diff command to compare all files in directory

I have two folders having in theory an identical folder structure and the same files. I wish to check for differences between the two copies in the two folders. I can run diff folder1/file1 folder2/file1 one by one but this is time consuming. Is…
To Do
  • 15,833
15
votes
4 answers

What's the Linux equivalent to Windows batch files?

I have a batch file which I use to create an .apk file on my Windows machine. Now I need to be able to create the .apk file in Ubuntu but I don't know how translate my .bat file to a script to be able to run it on Ubuntu. Below is the batch file…
Peyman
  • 151
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
  • 823
1
2 3
10 11