≡ Menu

BASH Shell

How to ignore invalid and self singed ssl connection errors with curl command

I wanted to curl command to ignore SSL certification warning. Does curl command have a --no-check-certificate option like wget command on Linux or Unix-like system?
[click to continue…]

How to copy a single file to multiple directories in Linux or Unix

If I want to copy a single file into three locations (directories), by using a single cp command (e.g. cp file /dir1/ /dir2/ /dir3/. Would that be possible? If yes, please provide the command for GNU/Linux or Unix operating systems.
[click to continue…]

How to check the file size in Linux/Unix bash shell scripting

I am a new bash shell scripting user. How do I find out the size of a file in my bash shell script and store this file size in a bash shell variable?
[click to continue…]

Linux / Unix: “-bash: python: command not found” error and solution

I am a new user and trying to run Python program. I have a cloud based VM/VPS and when I type python mycode.py at the terminal of my server, I get the following error:
-bash: python: command not found

How do I solve this problem?
[click to continue…]

Change Shell To Bash

How do I switch from a ksh shell to bash on Linux or Unix system? How to change shells on Unix-like system?
[click to continue…]

How to assign a grep command value to a variable in Linux/Unix

How do I store grep command output in shell variable? What is the syntax to store the command output into a variable in Linux or Unix?
[click to continue…]

How to change the screenshots save file location in MacOS X

I know how to capture my whole screen or just part of it. The screenshot is automatically saved to my desktop, and it is cluttering the entire desktop with .png screenshot files. How can I change where screenshots are saved on my MacOS X system instead of the default desktop location?
[click to continue…]

How to install wget on RHEL/CentOS 7 using yum

I am trying to download a file using ‘wget http://url’ syntax, but I am getting an error:

bash: wget: command not found

How do I fix this problem? How can I install wget on a CentOS/RHEL 7 or 6 server using yum command?
[click to continue…]

How to add to bash $PATH permanently on Linux

I am a new Linux and bash shell user. How do I permanently set $PATH on Linux? How can I permanently add a directory to shell PATH on Linux?
[click to continue…]

How to use curl command with http/2 on MacOS X

I am using a MacOS sierra (version 10.12.1). How do I use curl command with http2/ protocol? I am getting an error that read as follows:

            curl -I --http2 https://google.com
            curl: (1) Unsupported protocol

How do I solve this problem and use cURL with HTTP/2 on Mac OS X or MacOS Sierra?
[click to continue…]