Home » Tag Archives: bash

Tag Archives: bash

CVE-2014-6271 – Critical BASH vulnerability discovered (Shellshock)

Critical BASH vulnerability discovered – update BASH on your CentOS Linux server!!! ## Shellshock vulnerability ## Summary >> A critical code execution vulnerability (Remote) affecting bash (Unix shell) has been discovered on September 24, 2014. >> The vulnerability occurs because bash does not stop after processing the function definition; it continues to parse and execute shell commands following the function …

Read More »

HowTo Run a Script In Linux

How do I run a Linux shell script? How can I run a script in Linux? By default script will not run. You need to set execute permission for your script. To execute or run script type the following command: chmod +x script-name-here OR chmod 0755 script.sh Use the ls command to view permission on the script: $ ls -l …

Read More »

Bash Scripting Basics: Part 1

If you have been using computers for a while, whether you have been using Unix, Windows or Mac operating systems, you’re probably already familiar with the term shell. A shell is piece of software that is inbuilt into most operating systems which acts as an interface to the kernel and other software. Shells come in various shapes and sizes, but in …

Read More »

DOS-to-UNIX file conversion

Using Perl: # WARNING! For UNIX only! Do not use with ActivePerl in MSYS shell on Windows! # (Returns error message and file is deleted.) perl -pi -e 's/\r\n/\n/g' filename Using sh or bash: Works fine even in MSYS shell on Windows. #tr -d '\r' < original_filename > new_filename (Note that the “<” and “>” must be typed for this command to work). …

Read More »

Linux: Bash Find Matching All Dot Files

A dot-file is generally any file whose name begins with a full stop. In Linux it is also called as hidden file. How do I list all dot files in my home directory? You can use the ls command to list all dot files in your current directory:   ls .* Sample outputs: .bash_history .bash_profile .bashrc .lesshst .profile .viminfo .: …

Read More »