To edit video and audio files in ffmpeg, below are some commands. Open a terminal window and try them out. These are very useful when creating training videos. Extract mp3 audio from mp4 file$ ffmpeg -i video.mp4 -vn -ab 256k -ar 48000 -y audio.mp3 <enter> Split from 7 seconds to end$ ffmpeg -i audio.mp3 -ss … Continue reading ffmpeg audio file editing commands
Tag: shell
Completely remove Firefox from Ubuntu Linux or Xubuntu
Exercise due caution with your data before doing these steps. Take a data backup first. In order to completely remove Firefox from Ubuntu Linux, open a terminal window and enter the following: Delete the application $ sudo apt-get purge firefox* <enter> Remove the folders $ sudo rm -Rf /etc/firefox <enter>$ sudo rm -Rf /usr/lib/firefox* <enter>$ … Continue reading Completely remove Firefox from Ubuntu Linux or Xubuntu
How to work with flatpak on Linux Mint or Linux
Flatpak is a relatively new way of managing Linux packages. The basic commands of Flatpak are given below. To list flatpaks, use the below command in a terminal window: $ sudo flatpak list <enter> It will display the following output:Name Application ID Version Branch InstallationMint-Y Gtk Theme org.gtk.Gtk3theme.Mint-Y 3.22 systemMint-Y-Aqua Gtk The⦠org.gtk.Gtk3theme.Mint-Y-Aqua 3.22 system … Continue reading How to work with flatpak on Linux Mint or Linux
Autocomplete folder names in Linux terminal or shell
In a Linux terminal, you can autocomplete the folder names in any cd, rd, md command by typing it's few alphabets and then pressing the tab key.
How to query the GTK3 theme currently in use on Linux, enable dark mode and display missing icons in Gnucash
To view the current GTK3 theme in use on the XFCE desktop environment that is pre-installed in distributions like Linux Mint or Xubuntu, open a terminal window and enter the following comment: $ gtk-query-settings theme <enter> Upon enter, it displays the following: gtk-theme-name: "Mint-Y-Dark-Orange" gtk-icon-theme-name: "Mint-Y-Dark-Orange" ! gtk-fallback-icon-theme: NULL gtk-key-theme-name: NULL gtk-cursor-theme-name: "Bibata-Modern-Ice" gtk-cursor-theme-size: 24 … Continue reading How to query the GTK3 theme currently in use on Linux, enable dark mode and display missing icons in Gnucash
How to install python3 on Linux
Install python3 $ sudo apt-get install python3-pip python3-venv python3 <enter> Make an isolated environment$ mkdir environment <enter>$ cd environment <enter>$ python3 -m venv my_env <enter> where my_env is the isolated environment$ ls my_env <enter> to display the created folders Activate the isolated environment$ source ~/environment/my_env/bin/activate <enter> This will be the resulting prompt(my_env) patrick@rm01:~/environments$ Create a … Continue reading How to install python3 on Linux
How to remove duplicate files in Linux using rdfind
Duplicate files can be removed using the rdfind command in Linux. To do so open a terminal window and first install rdfind as below:$ sudo apt-get install rdfind <enter> Then, check for duplicate files on a medium:$ rdfind true . <enter> . is the current directory where I ran rdfind Make sure you have a … Continue reading How to remove duplicate files in Linux using rdfind
Sort text file in Linux from a particular position
I have a text file, named all.txt, with the following content:f http://www.google.com/f http://www.abc.com/c http://www.google.com/c http://www.abc.com/ I want to sort it on the URL ignoring the first 2 characters i.e f or c . To do this, Linux provides a sort command. Using the keydef option, the file can be sorted. To do so, open a … Continue reading Sort text file in Linux from a particular position
How to convert PostScript script to a .ps file for viewing in PDF viewer or to PNG
Reading about Gerard Huet's paper on the geometry of the Shri Yantra available in PDF format at this link http://pauillac.inria.fr/~huet/SKT/sanskrit.html.orig, I was prompted to try out the Postscript code he had in and Appendix in the paper. After typing the code into a .txt file, the file did not render using Evince or a PDF … Continue reading How to convert PostScript script to a .ps file for viewing in PDF viewer or to PNG
How to install ttf-mscorefonts-installer on Linux Mint
Do not install the package ttf-mscorefonts-installer using like Software Center or Synaptic on Linux Mint 21. It does not work because the user licence has to be accepted. To install the package, open a terminal window and enter: $ sudo apt-get install ttf-mscorefonts-installer <enter>