Posts

Showing posts with the label Bash

Four text commands in GNU/Linux, MS Windows, and, with a bit of nostalgia, MS-DOS.

Image
Table of Contents 1. Does it still make sense to perform operations via the command line? 2. How do you open a command terminal? 3. The “cd” command. 4. The “ls” and “dir” commands. 5. The “cp” command. 6. The “rm” command. 7. In conclusion. 1. Does it still make sense to perform operations via the command line? Talking about the command line in today's operating systems might seem a bit vintage, as if the topic were a historical remnant of the first personal computers of the 1980s. In reality, even today, the command line is an extraordinarily efficient resource, despite the most modern graphical interfaces. MS-DOS was my first operating system back when “windows” had not yet been invented. To write this article, I recovered from my paper library an old book published in 1989 dedicated to MS-DOS, in which I found my underlinings from that time. Graphical systems have made everything easier but not faster . The advantage of text commands over thei...

Extract a list of files from a folder and paste it into a document, in MS Windows, GNU/Linux and macOS.

Image
ABSTRACT Article on how to copy a list of files in a folder and paste the list into an open document. The operation is performed only with resources internal to the tested operating systems, which are MS Windows, GNU/Linux (Arch, Fedora and Ubuntu) and macOS, although in the last one, only in command-line mode. 1. Topic of this article. 2. Command line solution in MS Windows. 3. Command-line solution in GNU/Linux and macOS. 4. Graphical solution in Windows with File Explorer. 5. Graphical solution in Linux with File Manager. 1. Topic of this article. Have you ever had a folder on your computer full of files and need to insert the list of those files in a page you are editing? It happens to me often for file lists to be inserted at the end of court documents. In this article, I describe a couple of solutions that I have personally tried, in the MS Windows environment and in various UNIX -derived operating systems, i.e., some GNU/Linux distributions, particul...

Reducing the size of single or multiple PDF documents in GNU/Linux Bash and Python

Image
Abstract : Compression of PDF documents is a useful technique to reduce the space occupied by these files and facilitate their transmission and storage. In this article, starting from a page devoted to compressing single PDFs, I present two methods for compressing multiple PDF documents. The reference page is as follows: " Linux shell script to reduce PDF file size (simple verification required to enter) and allows you to operate on single PDFs in command-line bash code in the GNU/Linux terminal. Based on the previous one, I tried to extend the procedure to operate on multiple PDFs. In the end I present a simple application in Python with graphical interface. I admit that I asked for some help from ChatGPT and Copilot. Table of Contents: 1. The necessary condition. 2. The reference script for size reduction of individual PDFs 2.1. Script analysis and usage. 3. Derived script to operate on multiple PDFs. ...