Kali Linux Command Lines Part 3 – Working with Files

February 1, 2016 | Views: 3772

Begin Learning Cyber Security for FREE Now!

FREE REGISTRATIONAlready a Member Login Here

Welcome to Kali Linux Command Lines – Part 3. Here, I’ll show you the commands for files to work in Kali Linux. This article is absolutely for BEGINNERS, but as we move on with upcoming parts, we’ll see much more complex and advanced commands to work in Kali.

Note : Video Demo/Lab for this part is available here : VIDEO

Commands like : file, touch, rm, cp, mv/rename are for recognizing, creating, removing, copying and moving/renaming files. FILE 1 is different from file 1 (Case Sensitive)

 

– Command file:

The file command determines the file type. It recognizes the file.

e.g. When we have file named kali.png, to recognize this file as an image, we execute a command like:

file kali.png

 

– Command touch:

One easy way to create an empty file is with touch. (We’ll see many other ways for creating files later in this tutorial series.)

e.g. If we want to create file with filename ‘cybrary’, then we execute a command like:

touch cybrary

 

– Command rm:

When you no longer need a file, use rm to remove it. When you use rm to remove a file, the file is gone. Therefore, be careful when removing files!

To prevent ourselves from accidentally removing a file, we can type rm -i

Command rm -i

e.g. rm -i cybrary

 

– Command cp:

To copy a file, use cp with a source and a target argument. For this, we execute command like:

cp 2.txt 3.txt (makes new 3.txt and holds the content of 2.txt)

 


Ok, this was about working with files in Kali Linux command line. If you have any questions, please ask via comments.

Note: Video Demo/Lab for this part is available here : VIDEO

Share with Friends
FacebookTwitterLinkedInEmail
Use Cybytes and
Tip the Author!
Join
Share with Friends
FacebookTwitterLinkedInEmail
Ready to share your knowledge and expertise?
2 Comments
  1. I need more to learn. I think you can be a good teacher. I need to learn through passage not videos. Cause I don’t have a source of pc network here .Thank you

  2. Touch can also be used to update the file.

Comment on This

You must be logged in to post a comment.

Our Revolution

We believe Cyber Security training should be free, for everyone, FOREVER. Everyone, everywhere, deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is a free community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

Cybrary On The Go

Get the Cybrary app for Android for online and offline viewing of our lessons.

Get it on Google Play
 

Support Cybrary

Donate Here to Get This Month's Donor Badge

 
Skip to toolbar

We recommend always using caution when following any link

Are you sure you want to continue?

Continue
Cancel