Download from Google Drive using wget in Linux

By default, Google Drive does not allow plain wget commands (e.g. wget google-drive-link) in Linux. The workaround is to use the following syntax:

For example, to download the file from the Google Drive link below:

You can use the following wget command in Linux. Note that you have to enter the google drive file id twice and also enter the file name.
wget --load-cookies /tmp/cookies.txt "$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate '' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1vzHBVXvpF0dFKaDamJ6THg-0Gc-cSDoR" -O && rm -rf /tmp/cookies.txt

Thanks to this website below for the idea:

Protecting a folder in Unix/Linux using .htaccess and .htpasswd

To protect a folder in Unix/Linux using .htaccess and .htpasswd, use the following steps:
[1] Go to folder you wish to protect and create a file called .htaccess with the following info:

AuthUserFile /home/your_username/.htpasswd
AuthGroupFile /dev/null
AuthName “Restricted Area”
AuthType Basic
require user admin

[2] Go to the location for your .htpasswd file (typically should be in your home area outside of the public_html folder). If the .htpasswd file does not exist, create it using the following syntax. Enter the password when asked for.
> cd /home/your_username/
> htpasswd -c .htpasswd admin
[3] Make sure your .htpasswd file is readable from the web – chmod it to 644.
> chmod 644 .htpasswd
[4] If additional users need to be allowed access to the same folder,
[4.1] add the users to the .htaccess file (edit the file mentioned in step 1):
require user admin user2 user3
[4.2] add the users to the .htpasswd file (update the file mentioned in step 3). Note that the “-c” option in step 3 is not used here. The “-c” is only used when creating the .htaccess file:
> htpasswd .htpasswd user2
> htpasswd .htpasswd user3
An excellent and easy tutorial is at: A cached copy is here.

Restart Apache in Redhat/Fedora

Restart Apache:
service httpd restart
/etc/rc.d/init.d/httpd restart
Note: You should be logged in as root or use su
Other commands:
/etc/rc.d/init.d/httpd status
/etc/rc.d/init.d/httpd stop
/etc/rc.d/init.d/httpd start
Note: /etc/rc.d/init.d/httpd seems to be different from /usr/sbin/httpd
Location of “service”:
Example: /sbin/service sendmail restart