Skip to main content

Basic Linux Commands On Terminal


Change Directory

cd file_dir

Create Directory

mkdir file_dir

Delete Directory 

rm -rf file_dir

Create/Write File

nano my_file.txt (from nano editor)
vi my_file.txt (from vi editor)
vim my_file.txt (from vim editor)

Delete File 

rm my_file.txt

View File

cat my_file.txt

View Zip File content

zcat /tmp/excise_1/ivr-2.log.gz

Get File Properties

file my_file.txt

Show only log entries which contain text field

cat /var/log/audit.log | grep Error

Rename File / Move File

mv my_file_oll.txt my_file_new.txt

Copy File

cp my_file.txt /tmp/

Copy Directory

cp -r /tmp/dir /home/new_dir

SSH 

ssh username@ip
ssh global_info_portal@192.234.87.87

SCP

scp filename username@ip:/server_location
scp /tmp/my_file.txt global_info_portal@192.234.87.87:/tmp

Disk Space

df -h

Ram Detail

free -m

View Process

top

Kill process

kill -9 process_id
when using top command its second column number is process id.
kill -9 1998

Download File

curl http://example.com --output my.file


Comments

Popular posts from this blog

YOU ARE IN INTERVIEW !!

      Modesty is a cultural heritage of Sri Lankans as the history proves. Let's get a point. Is modesty a worth quality in an interview. The answer is big No. Nobody in the interview panel cares if you are a modest model citizen. They want you to market yourself, elaborate yourself. Being modest in an interview always tend to be be a tragedy end.

Is Morgan Freeman planning to retire from Hollywood??

If you are a Hollywood movie buff, Morgan Freeman is in your list of hall of famers for sure. He is a veteran of this business and he is a simply a legend. He is reportedly planning to retire.            The 76 old star is apparently ready to call time on his 50 year showbiz career and live our his days at his sprawling Mississippi farm, reported showbiz Spy. Morgan severely damaged his arm in a car crash and lives in constant agony.            Morgan has some serious health issues, and it an be agony for him just to get through a working day on the set. Even a year ago, he admits the thought of retiring hadn't even crossed his mine, but its front and center now. More about Morgan Freeman CLICK HERE

Escape Plan (2013)

                           Download When a structural-security authority finds himself set up and incarcerated in the world's most secret and secure prison, he has to use his skills to escape with help from the inside.