Posts

Project Wild Penguin 22.4.2017: To delete directories inside current directory whose contents are less than a given size

With GNU find and GNU coreutils, and assuming your directories don't have newlines in their names: find . -mindepth 1 -maxdepth 1 -type d -exec du -ks {} + | awk '$1 <= 50' | cut -f 2- This will list directories with total contents smaller than 50K. If you're happy with the results and you want to delete them, add | xargs -d \\n rm -rf to the end of the command line. Command: find . -mindepth 1 -maxdepth 1 -type d -exec du -ks {} + | awk '$1 <= 50' | cut -f 2- | xargs -d \\n rm -rf Source:  https://unix.stackexchange.com/questions/214089/command-to-delete-directories-whose-contents-are-less-than-a-given-size

Project Wild Penguin 23.4.2017: To list the size of sub-directories inside a directory using terminal

Simple command to list the size of sub-directories inside a directory using terminal : du -sh * | sort -h will get you a human-readable ascending list of the sizes of files and subdirectories in your current directory, du -sh will summarize the current directory size. Source:  https://askubuntu.com/questions/426809/how-to-list-the-size-of-a-directoy-and-subdirectories-and-files-inside-it-by-ter

Project Wild Penguin 20.4.2017: Wifi Connection Bug in Xubuntu 17.04

After updating my Xubuntu to latest version 17.04, I've found out that my wifi was disabled. No wifi connections were being shown in the indicator plugin. On googling, I've found out that there is a bug in the latest release. So to fix the bug, I followed the steps mentioned in one of the solutions provided by the good folks at askubuntu.com. The steps given were as follow: Open terminal and run: sudo vim /etc/NetworkManager/NetworkManager.conf   At the bottom of the file, copy and paste the following: [device] wifi.scan-rand-mac-address=no     Then just save and close the file and run: sudo service network-manager restart Check if Wifi is enabled or not. If it is still not enabled, go to Softwares & Updates > Additional Drivers > Click on Do not use the device under Broadcom Wireless Drivers as shown in the image below.      5. Click on Apply Changes and then restart the system, the Wifi should be enabled now. Hope it helps. If not,

Project Wild Penguin 19.4.2017: How to install manually installed packages on one system to another system remotely

Image
So, finally after a long time, I've found an original solution to my set of problems stated below: To backup and restore repositories.  To install manually installed packages on a new system or another system remotely. Most of the times, I've found straightforward answers to my queries from techgurus at askubuntu.com or any other sites. But this time, I've to be a bit more jugaadu by applying combinatorics to various solutions that I found to create a single solution for my problem  .  While implementing the solution, the question that was on back of my mind is beautifully depicted in the following xkcd comic: Will it work? If it doesn't, there is a likely chance of my system breaking down and lose of valuable time in fixing it. But thankfully, it did work.  Now, I'll share the process that I followed in implementing this solution. First part of the problem was achieved using the Y PPA Manager that I've mentioned in my blog post Fix dup

Project Wild Penguin 18.4.2017: Label Partitions and Automount on Startup

Image
Label Partitions: To label partitions on Linux based system from command line, follow the process given below: Replace /dev/sdxN with your partition (e.g. /dev/sdc1 ). for FAT32: sudo mlabel -i /dev/sdxN ::"my_label" or: sudo fatlabel /dev/sdxN my_label for NTFS: sudo ntfslabel /dev/sdxN my_label for exFAT: sudo exfatlabel /dev/sdxN my_label for ext2/3/4: sudo e2label /dev/sdxN my_label for BTRFS: sudo btrfs filesystem label /dev/sdxN my_label To label them through GUI based app, you can use GParted tool. Automount Partitions: To automount partitions on startup, follow the process given below: Fire up a terminal. [IMPORTANT] sudo cp /etc/fstab /etc/fstab.old - Create a backup of the fstab file just in case something unwanted happens. sudo blkid - Note the UUID of the partition you want to automount. sudo nano /etc/fstab - Copy the following line to the end of the file, save it and reboot afterwards to check if it worked.

Project Wild Penguin 17.4.2017: Fix duplicate sources.list entry

Image
To fix the above mentioned error, follow the list of steps that most easily provides the solution (also to backup PPA repository and other features too): You can remove duplicate entries in few easy steps with Y PPA Manager sudo add-apt-repository ppa:webupd8team/y-ppa-manager -y sudo apt-get update sudo apt-get install y-ppa-manager -y Open y-ppa-manager form Dash Enter You Admin Password. Double Click On Advanced. Scan & Remove Duplicate PPA's & Click Ok. It will take some time ( 1 or 2 Mints ) To Scan & Remove Duplicate PPA's. Source: https://askubuntu.com/questions/120621/how-to-fix-duplicate-sources-list-entry

Project Wild Penguin 16.4.2017: Automatically Fix Error W: Target Packages is configured multiple times in sources.list file

Image
The most up-to-date solution that I've found to fix the mentioned error is the blog title is given below: Installation: sudo apt install python3 - apt wget https :// raw . githubusercontent . com / davidfoerster / apt - remove - duplicate - source - entries / master / apt - remove - duplicate - source - entries . py chmod + x apt - remove - duplicate - source - entries . py Usage: sudo ./apt-remove-duplicate-source-entries.py Follow the instructions appearing on the screen Enjoy this xkcd comic about Packages (not Linux distros one): Source :   https://askubuntu.com/questions/760896/how-can-i-automatically-fix-w-target-packages-is-configured-multiple-times https://xkcd.com/576/