Easily find duplicate files in Linux with fdupes

‘fdupes’ is a handy tool to find and list duplicates file in GNU/Linux or Unix-like operating system.

In Ubuntu you can install fdupes using apt command-line tool

apt -y install fdupes

Usage of fdupes is simple enough, just write:

fdupes -r /path/to/files/

The command will list duplicate files in the “/path/to/files”directory, which is a prime candidate for deletion.

Get Free cronjob from Cron-Job.org!

Cronjob or CRON is an important tool to perform automated / schedule task for web application.

Some shared hosting company may limit (or completely disable) the cron service functionality leading to some web application unable to perform periodic / automated task.

Luckily there’s website such as Cron-Job.org which offers free cron-job to those who aren’t able to obtain one.

The best thing about Cron-Job.org service, is they allow minute-by-minute cronjob execution for free!

 

Bonus: The folks at Cron-Job also releases  the source code behind the service at GitHub!

How to Update Nmap scanner database

Nmap (or Network Mapper) is probably the most popular network mapper around. However if you are running a very stable long-term support server, there are chances that your nmap database installation isn’t keep up to that.

Updating Nmap database

Nmap detection database consists of these files:

  • nmap-os-db
  • nmap-mac-prefixes
  • nmap-payloads
  • nmap-protocols
  • nmap-rpc
  • nmap-service-probes
  • nmap-services

What you need to do is to download  these files from Nmap Github project  page and copy it to /usr/share/nmap/ folder.

Alternatively, you can use this script ‘nmap-update.sh’ which I’ve created based on this gist.

#!/bin/bash
wget -N https://raw.githubusercontent.com/nmap/nmap/master/nmap-mac-prefixes
wget -N https://raw.githubusercontent.com/nmap/nmap/master/nmap-os-db
wget -N https://raw.githubusercontent.com/nmap/nmap/master/nmap-payloads
wget -N https://raw.githubusercontent.com/nmap/nmap/master/nmap-protocols
wget -N https://raw.githubusercontent.com/nmap/nmap/master/nmap-rpc
wget -N https://raw.githubusercontent.com/nmap/nmap/master/nmap-service-probes
wget -N https://raw.githubusercontent.com/nmap/nmap/master/nmap-services

Copy all the files to /usr/share/nmap/ once all of them have been downloaded.

(y) (y)

 

Automatically generate gallery with llgal

LLGAL (llgal) is an tool which can automatically generate gallery on your website. llgal is handy if you want to generate photo album out of photos organized in directories/folders.

Running llgal from the console is easy as typing the llgal command at the root directory of your photos.

llgal --exif --li -L -R --title "Album Name" --sx 960 --sy 720 --tx 250 --ty 150

In Ubuntu, the gallery’s theme is located in “/usr/share/llgal/” directory and my customized theme which supports mobile phone can be downloaded here: llgal.zip (mobile enabled)

llgal Screenshot

Personally, i use llgal to generate cctv tiles automatically on my Ubuntu server from which my TP-LINK NC450 and NC250 IP camera uploads through its FTP functions when it detects movements/motion.

 

Installation

llgal can be installed on Ubuntu by running this command

apt -y install llgal

Alternatively you can compile and install llgal directly from its repository
https://github.com/bgoglin/llgal

crack zip password with cracker-ng

Cracking zip password can be made easy with cracker-ng

Installation

Installation is simple, assuming you use Debian, Ubuntu or any other similar operating system :

$ git clone https://github.com/BoboTiG/cracker-ng.git
$ cd cracker-ng

# For testers and contributors, always work with on the devel branch:
$ git checkout devel

$ make

Cracking

Cracking is relatively simple, assuming you have downloaded the awesome Crackstation’s wordlist dictionary.

$ zipcracker-ng -f targetfile.zip -w crackstation-human-only.txt

Additionally zipcracker-ng can also be used with other brute-forcing cracking tool such as john and

$ john --incremental --stdout | zipcracker-ng -f FILE -

$ crunch 1 8 -f charset.lst lalpha | zipcracker-ng -f FILE -

Screenshot of zipcracker-ng in action

crunch

Nano command for search and replace

I spend most of my time with headless Ubuntu server or Raspbian (a Debian derivatives distro for Raspberry Pi).

So naturally I use ‘nano’ to edit various configurations files and Python Scripts.

Here are several ‘nano’ shortcuts for your references

Searching

  • CTRL-W : search text string
  • ALT-W : repeat search
  • ALT-B : Backward search

Search and Replace

  • CTRL-\  search and replace

Cut, Copy and Paste

  • CTRL-K : Cut text
  • CTRL-V : Paste text
  • M-^ or ESc-^ : Copy text

Save and Exit

  • CTRL-O : Save file
  • CTRL-X : Exit nano

Indentation (useful for Python)

  • M-} :  Indent Right
  • M-{ : Indent Left (unindent)

 

That’s all which I can share for today…