≡ Menu

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…]

{ 4 comments }

How to fix: MacOS keep asking passphrase for ssh key after upgrade or reboots

I recently upgraded my MacOS Sierra and now ssh command keep asking for passphrase as follows when I try to login to my remote Linux/Unix server:
      Enter passphrase for key ‘/Users/vivek/.ssh/id_ed25519’:
How do I fix MacOS Sierra upgrade that keep breaking ssh keys in terminal?
[click to continue…]

{ 0 comments }

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…]

{ 1 comment }

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…]

{ 0 comments }

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…]

{ 4 comments }

How to secure MongoDB on Linux or Unix production server

MongoDB ransom attacks are in Wild. I am using it for storing data on my public facing cloud server powered by Ubuntu Linux. How do I protect and secure my MongoDB nosql server on Linux or Unix operating system?
[click to continue…]

{ 0 comments }

How to change the ssh port on Linux or Unix server

I am a new Linux/Unix server admin. How do I change the SSH Port for my Linux or Unix server using command line option?
[click to continue…]

{ 0 comments }

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…]

{ 1 comment }

Ubuntu Linux Install GNU GCC Compiler and Development Environment

How do I install GNU/GCC (C and C++) compiler and related tools (such as make, debugger, man pages) collection under Ubuntu Linux operating system using command line options?
[click to continue…]

{ 0 comments }

How to compile and install Tarsnap on a Ubuntu/Debian Linux

A Tarsnap service is a secure online backup system for Linux, OSX, *BSD or UNIX-like system. They encrypt and store data in Amazon S3. The services also use rsync-like algorithms, and only backup data that has been changed since the last dump. The backups are protected by a security key only known to a backup operator or sysadmin. How do I install a tarsnap client on a Ubuntu or Debian Linux system?
[click to continue…]

{ 2 comments }