To password protect a folder in Linux

Use the zip command: zip -e -r "name_of_the_new_zip_file" "path_of_the_folder_which_has_to_be_protected" Example: If you want to protect a folder named "old" in your desktop. Just do it... zip -e -r /home/gautam/Desktop/new /home/gautam/Desktop/old [gautam@gautam-home ~]$ zip -e -r /home/gautam/Desktop/new /home/gautam/Desktop/old Enter password: Verify password: This will create a zip file named "new.zip" in your desktop (new.zip). After that delete the folder "old".

0 comments: