Ubuntu move content to parent directory — October 3, 2017

Ubuntu move content to parent directory

It’s super simple. For example you want to move content.txt from folder2 to folder1 content.txt

cd folder1/folder2/
mv * ../
Advertisements
Ubuntu Secure Boot error “Image failed to verify with *ACCESS DENIED* on startup — September 19, 2017

Ubuntu Secure Boot error “Image failed to verify with *ACCESS DENIED* on startup

After updating GRUB in Ubuntu I got this error and I was so afraid of this. But a YOUTUBE video helped me to recover from this. May this post can help you too.

I was using SAMSUNG laptop. Here is what we need to do.

Go to BIOS->BOOT

You will see an option ‘SECURE BOOT’ and you need to disable it. Also when you disable it you will see an other option appears named as ‘OS MODE SELECTION’. If you disable ‘SECURE BOOT’ and your OS still cant boot then you need to change the options given in ‘OS MODE SELECTION’.

Ubuntu add proxy with username, password and port — July 26, 2017

Ubuntu add proxy with username, password and port

I have tested this with Ubuntu 14.04
First go to system settings > Network > Network Proxy
and fill ‘Proxy’ and ‘Port’
Then click on ‘Apply system wide’

Now open apt.conf file

gksudo gedit /etc/apt/apt.conf

and add this

Acquire::http::proxy "http://username:password@proxy_ip:port/";
Acquire::https::proxy "https://username:password@proxy_ip:port/";
Acquire::ftp::proxy "ftp://username:password@proxy_ip:port/";
Acquire::socks::proxy "socks://username:password@proxy_ip:port/";

Take care of every semi-colon and slash. Save this,

Now open this ‘environment’ file. For this file you may need sudo password

nano /etc/environment

and add this

http_proxy="http://username:password@proxy_ip:port/"
https_proxy="https://username:password@proxy_ip:port/"
ftp_proxy="ftp://username:password@proxy_ip:port/"
socks_proxy="socks://username:password@proxy_ip:port/"

save file and then logout user to check settings. Use this command

set | grep -i proxy

and check if you see any variables now. If yes then you have successfully enabled proxy.
Now open firefox and check if it asks for password on startup. Then enter proxy username and password and Boom :).

Ubuntu wget scrap a website — July 23, 2017

Ubuntu wget scrap a website

$ wget \
     --recursive \
     --no-clobber \
     --page-requisites \
     --html-extension \
     --convert-links \
     --restrict-file-names=windows \
     --domains website.org \
     --no-parent \
         www.website.org/tutorials/html/

This command downloads the Web site www.website.org/tutorials/html/.

The options are:

  • –recursive: download the entire Web site.
  • –domains website.org: don’t follow links outside website.org.
  • –no-parent: don’t follow links outside the directory tutorials/html/.
  • –page-requisites: get all the elements that compose the page (images, CSS and so on).
  • –html-extension: save files with the .html extension.
  • –convert-links: convert links so that they work locally, off-line.
  • –restrict-file-names=windows: modify filenames so that they will work in Windows as well.
  • –no-clobber: don’t overwrite any existing files (used in case the download is interrupted and
    resumed).

You can read of original resource.

Ubuntu install missing packages — July 18, 2017
Ubuntu find file in directory and get file information — July 16, 2017
Ubuntu delete directories or files command line — July 13, 2017

Ubuntu delete directories or files command line

To delete all file in a directory

rm /path/to/directory/*

To remove the folder with all its contents(including all interior folders):

rm -rf /path/to/directory

To remove all the contents of the folder(including all interior folders) but not the folder itself:

rm -rf /path/to/directory/*

To remove all the “files” from inside a folder(not removing interior folders):

rm -f /path/to/directory/*

rm – stands for “remove”
-f – stands for “force” which is helpful when you don’t want to be asked/prompted if you want to remove an archive, for example.
-r – stands for “recursive” which means that you want to go recursively down every folder and remove everything.