Whether you're a beginner or a pro, HakTip is essential viewing for current and aspiring hackers, computer enthusiasts, and IT professionals. With a how-to approach to all things Information Technology, HakTip breaks down the core concepts, tools, and techniques of Linux, Wireless Networks, Systems... Read More
Today on HakTip, I will be focusing on some Linux Terminal commands that'll help you manipulate and move files.
It's time for some more Linux terminal-fu! So last time on HakTip, I checked out a few simple commands: cd for changing the directory and ls to list files to name a few. This week, lets delve a little deeper, shall we? I'm pretty new to the Linux side of things, but after years of using Windows, I'm branching out and teaching myself how to use this awesome OS. Back to the terminal. So when I list my files, if I want to see what kind of file types they are, I can type file pic.jpg and it'll show me the file information. Then there is a built in program called less. Less lets you view text files in the terminal by typing less filename.
While in the less program, you can use some other commands to move around. (less --help). There are several built in programs similar to less that make it easier to use the Terminal, and this is just one of the many you can choose from. Now that you know how to move around and view text files, you have the ability to explore your Linux system in more depth! We'll check out a bit of file manipulation after the break.
Let's manipulate some files. We can move, copy, remove and rename files/directories, and we can also make directories as well. We already know how to make a directory with mkdir directoryname. I want to copy this photo into my new directory, so I would type cp pic.jpg folder1, or I can type cp pic.jpg pic1.jpg to create a copy in the same folder. Remember, you can type --help to find all the other options for copy.
If you want to move a file, type mv file1 file2 and you can also move the file to another directory by typing mv pic.jpg Documents. If you want to remove a file or directory, type rm pic.jpg, but be careful! If you want to use a wildcard, like an asterisk (*), for example to delete all .jpg, you could type rm *.jpg. Don't put a space between * and .jpg, or the rm command will try to delete everything, then tell you there isn't any file called .jpg. Next time on HakTip I'll talk a little more about wildcards, and discuss what the heck it means to create links.
How did you learn the terminal? There are lots of handy websites out there that go really into detail about how to use it. Tell me about your favorites in the comments or email me at firstname.lastname@example.org. And be sure to check out our sister show, Hak5 for more great stuff just like this. I'll be there, reminding you to trust your technolust.
9 days ago
Employers want social media passwords, US gets a #CPO, and #TheOnion! All that and more this time on #ThreatWire! http://t.co/SrZpicvnt6
12 days ago
#Installing #Solar panels, #Google #Chrome #extensions, and more on @Hak5! http://t.co/QppYLgZpi5
12 days ago
Legalizing #Internet eavesdropping, #LivingSocial is #hacked, and more on this weeks #ThreatWire! http://t.co/xyIxzy8kes
12 days ago
@thescribe I didn't! They were disabled and enabled throughout the segment. Each one has a different icon. - @Snubs
12 days ago
@myraitnetwork thank you!
27 days ago
#PGP #Encrypt your email, back up your #Gmail Account with #Ubuntu, text #messaging your #WiFi #Pineapple On #Hak5! http://t.co/KSZeO4GEPU