Friday, December 23, 2022

Download zip file from Google Drive

 First

Share your file in GD (with anybody access by link) and get FILEID

Second

Execute next code(replace FILEID and choose FILENAME):

wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=FILEID" -O FILENAME && rm -rf /tmp/cookies.txt

 

Note:

Previous methods doesn't work, because now GD needs confirmation, then using cookies it's possible.

Monday, December 12, 2022

Ubuntu NFS Installation

On Server (10.10.7.229):

$ sudo apt install nfs-kernel-server  #install server

$ sudo mkdir -p /mnt/nfs_drive  #create share point

$ sudo chown -R nobody:nogroup /mnt/nfs_drive  #no owner

$ sudo chmod 777 /mnt/nfs_drive  #set r/w permission

$ sudo vi /etc/exports  #define clients grants
 

/mnt/nfs_drive 10.10.7.218(rw,sync,no_subtree_check) #mine
/mnt/nfs_drive 10.10.7.235(rw,sync,no_subtree_check) #houdini

$ sudo exportfs -a

$ sudo systemctl restart nfs-kernel-server
 

On Client: 

$ sudo apt install nfs-common 

$ sudo mkdir -p /mnt/nfs_drive_client   #mirror

$ sudo mount 10.10.7.229:/mnt/nfs_drive /mnt/nfs_drive_client

Notes: 

$ sudo ufw status  #verify the firewall, more details in reference[0]


References: 

[0] Working https://linuxhint.com/install-and-configure-nfs-server-ubuntu-22-04/

[1] https://www.tecmint.com/install-nfs-server-on-ubuntu/

Firefox open multiple private window

    /opt/firefox/firefox-bin --profile $(mktemp -d) --private-window www.google.com www.bing.com