Kompx.com or Compmiscellanea.com

Unzip multiple files. Linux

Operating systems : Linux

Unzip multiple zip files into one directory by Linux command line unzip. Contrary to possible expectations, "unzip *.zip" is not going to work, *.zip should be put into quotes:

unzip "*.zip"

There may be files with the same names in these archives. To avoid overwriting:

unzip -B "*.zip"

"Unzip -B" makes unzip to overwrite duplicates during extraction process, but saving a backup copy of each overwritten file. The names for these backup copy files are created by adding tilde ("~") at the end of the original names of the files. If a file extension is present, then "~" is added after it. If that is not enough, unique sequence number (up to 5 digits) is appended after the "~".

"Unzip -B" is not too practical. For example, since when the sequence number range for numbered backup files gets exhausted (99999, or 65535 for 16-bit systems), the backup file with the maximum sequence number is deleted and replaced by the new backup version without notice ( More on the subject ). The number of files in an archive may not be always known in advance or may be more than possible sequence number range, so "Unzip -B" is not a great choice. Renaming duplicate files by adding "~" at the end of their names, after the extension, is not too convenient either.

But another built-in option is even worse. If the "-B" modifier is not used, each time a file with same name as there already unpacked is being extracted, unzip asks "replace example.txt? [y]es, [n]o, [A]ll, [N]one, [r]ename:". And each time "r" must be hit, then a new name has to be input. So some bash or another script solving the problem should probably be prepared and used instead.

Aliosque subditos et thema


Screenshots in DOS


There are several programs for taking screenshots in DOS. SNARF, for instance. Using this application succeeded in taking screenshots in most of the cases. Also, the screenshots' quality (.BMP files) by SNARF results to be the highest among the programs tested: ScreenThief, VideoThief, FLIP, GRABBER, SNARF. Using SNARF with default settings is straightforward, but there is a shortcoming - SNARF always saves screenshots to the folder where the user is currently in. That could be inconvenient or unacceptable. And there is no obvious way to change it. But there is a roundabout option. The initial idea had been found on this page. The result based on it: 1. SNARF [ Download ] 2. Open SNARF.EXE in a text editor in text mode (not hex), find snarf000.bmp and replace it for s:scn000.bin 3. Create a batch file, S.BAT for example, where besides a string for starting SNARF.EXE will be a command assigning the path to the folder screenshots will be saved into to a virtual drive S: The folder and path may be any: C:\SOFT\SNARF.EXE SUBST S: C:\SCREENS\ 4. Start SNARF: S [or S.BAT] 5. To take a screenshot: Alt + S There will be two beeps. The first at the beginning and the second one as a sign the process has completed successfully. After the screenshots are taken, go to the folder where they are saved in and replace the file extensions from .BIN to .BMP SNARF - Freeware.

Windows console applications. Multimedia


MPlayer : FFmpeg Media players appeared long ago, but their heyday began with the mass spread of personal computers powerful enough to play video files. This coincided with the mass spread of operating systems and other software with graphical user interface. However, a program with a graphical user interface is dualistic in its nature: there is a code responsible for graphical user interface, for the appearance and there is a code - for performing the task the given application has been created for in the first place. Both code complexes consume system resources, their response time to user actions makes up certain amount of waiting time. And in cases or concepts when appearance is taken as less important - less important to the point of sparing or almost sparing to employ it - console applications, among others, appear. Moreover, the segmentation of the GUI and of the engine makes it easier to change the graphical user interface or perform complex automated operations. The scheme is implemented for media players for Windows as well. MPlayer, for instance, in its usual form is a console application, starting up quickly, having fast response to user actions, consuming system resources almost entirely for its immediate task. And on this basis if desired, one or another graphical interface may be added for creating, all in all, a new application. MPlayer - / home page / Console media player for Windows. Basis for SMPlayer and UMPlayer. There are versions for Linux, FreeBSD, NetBSD, OpenBSD, Apple Darwin, Mac OS X, QNX, OpenSolaris/Solaris, Irix, HP-UX, AIX, some other *nix system, BeOS, Syllable, AmigaOS, AROS, MorphOS, DOS, Windows. Supported video, audio formats, static images, subtitles, etc. ( List and More extensive list of video and audio codecs ). MPlayer: "Dead Man" MPlayer: "Sky Captain and the World of Tomorrow" MPlayer: "10,000 BC" MPlayer: "13 Tzameti" MPlayer: "The Draughtsman's Contract" MPlayer: "Balzaminov's Marriage" FFmpeg - / home page / Pack of utilities and libraries for work with video and audio files. Created in and for Linux, but there is a Windows variant. Source code may be compiled for some other operating systems. Supported file formats and codecs: ( List ). Also, VLC media player can be run in text mode, ncurses using.