Archive: May, 2016

How to Setup Chroot SFTP in Linux (Allow Only SFTP, not SSH)

May 25, 2016 by Linux Guru

Filed under Linux, Security

Last modified June 14, 2016

If you want to setup an account on your system that will be used only to transfer files (and not to ssh to the system), you should setup SFTP Chroot Jail. 1. Create a New Group Create a group called sftpusers. Only users who belong to this group will be automatically restricted to the SFTP chroot environment on this system. # groupadd sftpusers 2. Create …

unix command list folders file counts

May 25, 2016 by Linux Guru

Filed under Application

Last modified June 14, 2016

unix command list folders file counts I want to get a list of folders at the current level (not including their subfolders) and simply print the folder name and a count of the number of files in the folder (preferably filtering to *.jpeg if possible), unix command list folders file counts I’ve come up with this one: $vi count.sh find -maxdepth 1 -type d | …

Display bandwidth usage on an interface on linux

May 25, 2016 by Linux Guru

Filed under Linux

Last modified June 14, 2016

Display bandwidth usage on an interface on linux iftop – display bandwidth usage on an interface by host iftop does for network usage what top(1) does for CPU usage. It listens to network traffic on a named interface and displays a table of current bandwidth usage by pairs of hosts. #yum install iftop #iftop -i interface