Linux script command pdf

Linux Command Line and Shell Scripting Bible

This reference shows how to use commands to create scripts within each shell and demonstrates practical applications for shell scripts, and guides administrators through advanced projects for using shell scripts in real-world applications. Expand

Figures and Tables from this paper

31 Citations

Development and Research of Root File System Based on Cortex-A 8 Microprocessor

The method described in the article can be successfully run in the ARM development board, to provide the necessary environment for the development of embedded systems. Expand

Collaborative Development and Use of Scientific Applications in Orlando Tools: Integration, Delivery, and Deployment

This work implements and automate the non-trivial technological sequence of the collaborative development and use of packages including the continuous integration, delivery, deployment, and execution of package modules in a heterogeneous distributed environment that integrates grid and cloud computing. Expand

Software aging in the eucalyptus cloud computing infrastructure

This article investigates the software aging effects in the Eucalyptus framework, considering workloads composed of intensive requests for remote storage attachment and virtual machine instantiations and presents an approach that applies time series analysis to schedule rejuvenation, so as to reduce the downtime. Expand

Characterization of Software Aging Effects in Elastic Storage Mechanisms for Private Clouds

This work investigates the software aging effects in a Eucalyptus environment, considering workloads composed of intensive requests for attaching remote storage volumes to virtual machines and evidenced that memory leaks in Node Controller and the high CPU utilization by the KVM process are strongly correlated. Expand

Selection of the type of cooling for an overclocked Raspberry Pi 4B minicomputer processor operating at maximum load conditions

Temperature measurements were taken during the maximum processor load on all cores at the clock setting that enabled reaching the highest performance, and showed that only the use of active cooling noticeably improves the operating conditions of the device, due to lowering the temperature by about 15°C. Expand

Читайте также:  Linux открыть файл от имени администратора

Experimental evaluation of software aging effects in the eucalyptus elastic block storage

This work investigates the software aging effects on the Eucalyptus framework, considering workloads composed of intensive requests for attaching remote storage volumes to virtual machines and evidenced problems that may be harmful to system dependability and its performance. Expand

An Investigative Approach to Software Aging in Android Applications

An investigative approach to indicators of software aging in applications developed for Android, a Linux-based operating system primarily designed for touch screen mobile devices such as smartphones and tablets, confirmed both the effectiveness of the procedure and the existence ofSoftware aging phenomenon in the Foursquare application running on the Android OS platform. Expand

Автоматизированная система обработки данных в unix-подобных системах@@@Automated data processing system in UNIX-like systems

The created hardware and software complex allows processing input and output information effectively in an automatic mode in order to increase capacity of reception and sending data in MySQL DBMS, including cases with DoS- and the DDoS-attacks. Expand

Investigation of Software Aging Effects on the OpenStack Cloud Computing Platform

The results indicate software aging issues in the MySQL process; a growth on the memory consumption was detected, and a prediction analysis was also used to estimate the resources utilization in the future. Expand

Software Aging Issues in Streaming Video Player

The occurrence of software aging in a web browser plug-in for video streaming is evaluated by using an automated workload that simulates the user behavior accessing videos on YouTube, and the prediction-based and time-based strategies are compared. Expand

Источник

How do I create a blank PDF from the command line?

I recently needed a single blank PDF page (8.5″ x 11″ size) and realized that I didn’t know how to make one from the command line. Issuing touch blank.pdf produces an empty PDF file. Is there a command line tool that produces an empty PDF page?

Why do you need it? I have a printing package for emulating two-sided (duplex) printing on non-duplex printers. Doing this requires putting out an extra blank page when printing the even numbered pages for a job that has an odd page count. To do this, I just send a formfeed to lp. That does the trick without creating a blank page file, etc..

Читайте также:  Linux абсолютный путь до файла

@IainHolder — I’m not trying to pry into the OP’s business! I just wanted to suggest that if it’s something like what I was doing, then there’s another way to do it. Often things like this are xy problems (meta.stackexchange.com/questions/66377/what-is-the-xy-problem), so asking what the goal is can be quite appropriate.

I just read through the link above in detail. I didn’t realize this was such a controversial issue. TL;DR — if you know what you’re doing, then you just want the answer to the question you asked. If you’re not so well versed, you may have asked the wrong question and clarification of what the real issue is could help.

11 Answers 11

convert , the ImageMagick utility used in Ketan’s answer, also allows you to write something like

convert xc:none -page Letter a.pdf 
convert xc:none -page A4 a.pdf 

or (for horizontal A4 paper)

convert xc:none -page 842x595 a.pdf 

etc., without creating an empty text file. @chbrown noticed that this creates a smaller pdf file.

«xc:» means «X Constant Image» but could really be thought of as «x canvas». It’s a way to specify a single block of a color, in this case none. More info at http://imagemagick.org/Usage/canvas/#solid which is the «de facto» manual for ImageMagick. [supplemented with information from pipe] (Things like pdf:a can be used to explicitly declare the format of a file. label:’some text’ , gradient: , rose: and logo: seem to be other examples of special file formats.)

Anko suggested posting this modification as a separate answer, so I am doing it.

ImageMagick does not really have a useful manual. «xc:» means «X Constant Image» but could really be thought of as «x canvas». It’s a way to specify a single block of a color, in this case none. More info at imagemagick.org/Usage/canvas/#solid which is the «de facto» manual for ImageMagick.

When running this command I got an error convert-im6.q16: not authorized ‘blank.pdf’ @ error/constitute.c/WriteImage/1037 , but I found the solution here: askubuntu.com/questions/1081895/… Posting here in case it helps anyone else who runs into the same issue.

Like the smallest possible GIF, the smallest possible blank-page PDF needs to be worked out by hand, because it’s so small that unnecessary-but-harmless bits of metadata become a significant part of the file size, and compression actually makes things bigger. It also requires careful attention to the rules in the PDF specification about what bits of the file structure are and are not required. (Did you know that page objects must contain a /Resources dictionary, even if it’s empty, but are not required to include a /Contents stream?)

Читайте также:  Запустить cmd в linux

If you don’t use PDF 1.5 object and cross-reference streams (which has the advantage that the file can be completely printable ASCII) I believe the best you can do is 317 bytes. If copying and pasting, take note that there needs to be a trailing space on all four of the cross-reference table entries (the lines between 0 4 and trailernot supposed to be a final newline after the %%EOF .

%PDF-1.4 1 0 obj>endobj 2 0 obj>endobj 3 0 obj>>>endobj xref 0 4 0000000000 65535 f 0000000009 00000 n 0000000052 00000 n 0000000101 00000 n trailer> startxref 178 %%EOF 

Replacing the cross-reference table with a manually crafted v1.5 cross-reference stream does make the file slightly smaller, at the price of its no longer being printable ASCII: 294 bytes. (For the sake of readability, not to mention being able to type it in at all, the xref stream below has been hexdumped, but this is not reflected in its stream dictionary. To recover a valid PDF you must either replace the hexdump with the corresponding raw binary bytes, or change /Length 15 to /Length 30/Filter/ASCIIHexDecode and accept a file that is 328 bytes long.)

%PDF-1.5 1 0 obj>endobj 2 0 obj>endobj 3 0 obj>>>endobj 4 0 obj>stream 0000ff01090001340001650001b200endstream endobj startxref 178 %%EOF 

I also experimented with wrapping objects 1 through 3 into an object stream, but this adds back more overhead than it saves, even when the stream is compressed.

A possible alternative formulation of the xref stream is

4 0 obj>stream 091365b2endstream endobj 

Sadly, despite the substantial savings in the length of the actual stream data, the additional /Index[1 4] eats up all but one byte of the savings. Also, it is unclear to me whether you’re allowed to leave object 0 completely out of the file. (It’s also unclear to me whether object 0 must have generation number -1. If that’s not required, you actually save more bytes with

4 0 obj>stream 000001090134016501b2endstream endobj 

To change the paper size, replace 612 792 with the appropriate width and height, expressed in PostScript points (72 PostScript points = 1 U.S. inch or 25.4 millimeters). For instance, 595 842 for A4. You could embed this in a shell script that spits out a blank PDF of whatever paper size is desired; the only tricky part would be making sure that the startxref offset remained accurate even if the size of object 3 changed.

Источник

Оцените статью
Adblock
detector