Linux Command Line for Beginners - Part A

Yesterday, was a holiday in India in regards to UGADI (Telugu New Year). A prosperous day to start doing good things in life.

I thought of refreshing my knowledge on Linux Commands, as the project I work on runs on Linux.
There is no immediate need to learn, as I am aware of concepts which I use at work.

New Learning:
I have installed Ubuntu on Windows 10 with the help of below article.
https://docs.microsoft.com/en-us/windows/wsl/install-win10

Below are commands I have learnt.

man cat
Linux Manual for cat
pwd
Present current working directory
ls
List contents of current directory
ls -a
List all contents including hidden files and folders in current directory
ls -al
List all contents including hidden files and folders in current directory with Permissions, Date Time, Size of File.
cd
Change directory
cd ~
Move to Home directory
cd ..
Move to Parent Directory
cd .
Move to Current Directory
cd /
Move to Root Directory
ls -l
List all contents: long listing format
alias shortcut=”command”
Creating an alias
alias
To see other aliases
echo “text” > filename.ext
Creating file with Text
cp oldfile.ext newfile.ext
Copying the file content from one file to another
cat file.ext
View File Contents
less file.ext
View File Contents
cp file1.txt file2.txt dire/
Copying the files to directory
clear
Clear the Terminal
cp -r dire1 direc2
Copying the directory and files to new directory
mv file1.txt direc2
Moving the file to directory
mv file2.txt file3.txt file4.txt directory
Moving the files to directory
mv directory directory3
Moving the directory to new directory
mv file7.txt file9.txt
Renaming the file 
mv directory3 newdirectory
Renaming the directory
rm file9.txt
Deleting the file
rm file10.txt file23.txt
Deleting multiple files
rm -r newdirectory
Deleting the directory - Recursively
rm -rf newdirectory
Recursively Force Delete
tail
Monitor the Files
seq 1 100 > file.txt
Adding sequence of numbers to new file
Down arrow, we can move down line by line
Up arrow, we can move up line by line
Space Bar, we can move page by page forward
F Key, we can move page by page forward
B Key, we can move page by page backwards 
Q key, to exit from less
Log Files Reading
tail numbers.txt
Print last 10 lines by default - latest log

Popular Posts

JMeter Producing Error: Windows RegCreateKeyEx(...) returned error code 5

Understanding about Contract Testing