Linux Archives

Over 80% is running on some form of Linux – so does your Mac and you iPhone. Sometimes we have to get our hands dirty on the command line – it makes you feel like a proper hacker.

Here are some pointers I picked up on my journey.

How to split a ZIP file into multiple parts on macOS and Linux

ZIP files can get quite large, depending on the amount of data we’re ZIPping up there. Having one huge file may not always be desirable, for example when making hard copies onto disk or tape media, or when upload limitations force the use of smaller files. Thankfully, the clever little ZIP utility has a handy … Read more

How to remove files from ZIP Archives in macOS and Linux

When ZIP up directories, particularly on macOS, some files may find their way into our ZIP archives that were never meant to be there. I’m thinking of those pesky .DS_Store and __MACOSX files, maybe even .htaccess files. For *nix based systems, * really means “everything”. The ZIP command line tool let us remove such unwanted … Read more

How to unTAR a .bz2 file in Linux

I always forget how to unTAR a .bz2 file – perhaps this little memory aid will help me remember for the future. tar -xjvf filename.bz2 This will do the trick 🙂 The key to the magic is to provide the j switch, which tells the TAR command to use bzip2 compression.

How to transfer files from your GoPro to your computer via WiFi

There is an iOS and Android App available to transfer files directly from a GoPro camera to a mobile device. Those apps transcode files and compress them for easier viewing, and to save storage space.

While that approach gets footage onto my iPhone, I still need to transfer the files to my Mac for editing. Plus, there’s an additional compression step involved which can’t be good for picture quality. Besides, it takes forever to do its job.

A much more useful approach would be to hook directly into the GoPro and transfer files that way. This leaves the SD card place and doesn’t disturb the (sometimes hard to reach or difficult to recreate) position of the camera.

Here’s how to do it.

Read more

How to switch off emails from Anacron in Plesk Onyx

In 2011 I wrote an article about how to avoid emails from Dr. Web. In it I was discussing how to switch off these notifications, which are generated when the Dr. Web service updates itself. Here’s an example: /etc/cron.daily/drweb-update: Dr.Web update details: Update server: http://update.msk5.drweb.com/plesk/700/unix Update has begun at Fri May 18 03:53:47 2018 Update … Read more

How to host multiple websites with Apache

The Apache web server has a convenient feature called Name-based Virtual Hosting. This function allows us to have a single LAMP Stack server configured on one IP address, but serve a different set of files depending on which domain is being requested.

This sounds more complicated than it is. Say we had example1.com and example2.com, both of which are to be separate websites, but both domains point to the same IP address. Apache’s Name-based Virtual hosting makes this possible. In fact, this feature forms the basis of 90% of this planet’s shared hosting business.

Let’s see how to do this in CentOS 6 and 7.

Read more