Tagged: bash

0

How to sudo in windows

There is no sudo com­mand in win­dows. But you can run the com­mand prompt with admin priv­i­leges by right click­ing the it and select­ing run as administrator.

0

Autocomplete cli from history

Use the fol­low­ing steps to do the reverse search in your bash his­tory. $ Ctrl + R $(reverse-i-search)‘’: [start typ­ing com­mand…] [Tab/Enter] — Tab will com­plete the com­mand and brings back the CLI. -…

0

$? variable in linux

$? Sta­tus of the pre­vi­ous process / com­mand which ran on the shell $ pwd $ echo $? // returns 0 which means the pre­vi­ous com­mand ran sucess­fully $ blah­Com­mand $echo $? // returns 1…

0

rename extension of multiple files linux

I recently wanted to rename all my jpg files to png files in one folder on my ubuntu device. The fol­low­ing com­mand did the trick for me. rename ‘s/.jpg$/.png/’ *.jpg

0

How to create scripts in terminal

Fol­low three sim­ple steps to auto­mate your ter­mi­nal. Cre­ate a script Set the per­mis­sions Exe­cute the script Cre­ate a script test.sh $vi test.sh ls –la echo ‘Hello Bash!’ Set the per­mis­sions $sudo chmod 777…