gnu/linux

Passive connections in ProFTPD

proftpd Passive ftp connections are very common when set behind a proxy or firewall. In a passive ftp connection, the client sends the PASV command to the server and is the server who selects a port at random and sends it to the client. We must configure directive PassivePorts in ProFTPD.

Listing directories, 7 practical examples

GNU/Linux

ls is a utility that list information for any file type including directories, by default (when not passed any option) ls displays the contents of the current (or specified) DIR no recursively, ordered alphabetically and ignoring the hidden files/directories.

Rename in mass

GNU/Linux
prename is a utility developed in Perl by Larry Wall (creator of the Perl language) and improved by Robin Barker, which allows you to rename in masses. prename finds all files whose name matches a pattern specified (REGEXP). This utility is part of the perl package in Debian GNU/Linux.

Error decompressing .tar.xz file

Debian GNU/Linux

When you try to unpack a .tar.xz file you get the following error messages:

tar (child): xz: Cannot exec: No such file or directory
(child) tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

Cropping images in mass

ImageMagick

Recently a friend told me:

I have to remove the watermark of hundreds of images, you could do it with a program like GIMP but are hundreds of images, I know that you can automate this process using some commands of the ImageMagick suite; I need your help to make the script in bash.

Get the size of a directory/file on GNU/Linux

Desktops such as GNOME, KDE, LXDE, XFCE offer an easy way to determine the size of a file or directory, right-click on the file in question, select properties from the context menu, but environments servers we dont like those mentioned above so it should resort to the CLI and make use of the du command which calculates the space occupied by a file or directory