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 checking out some Linux Terminal shortcuts called Wildcards, as well as hard and symbolic links.
As I've been learning the Linux terminal, I've been sharing what I've found throughout HakTip, and I find it pretty exciting! I'm a nerd, I know. This week, lets check out a few interesting topics: wildcards, hard links, and symbolic links.
Wildcards are a group of these special characters that you can use to specify a big group of file names instead of having to type out each one. Using wildcards is also called 'globbing'. No really.
Let's check a few of these out. First off, '*', will match 'any characters' with your query. A '?' matches with any single character. [characters] chooses a set character, [!characters] will match with any character that is NOT a member of that group of characters in the bracket. [[:class:]] will match with any character that is a member of a specified class. A class can be a number, letter, lowercase letter, or uppercase letter to name a few.
Examples: I want to copy my pic file, so I could type cp p* Folder1. This will copy any file starting with p to Folder1. I want to move my upgrade.bin file- so I could type mv u*.bin Documents to move any .bin starting with the letter u to my Documents folder. I could replace this with mv p?? to move my pic file. the ?? means any file that starts with p and has two characters after it. I could move my photo and my upgrade.bin file by typing mv [up]*, which means any file that starts with either u or p. The list goes on and on. The cool thing about wildcards is- they also work in the GUI.
The ln command lets you create hard and symbolic links. You can use it by either typing ln file link, or ln -s item link. Basically, a hard link is the original way of creating links- Every file has one and that is what gives the file its name. A hard link creates an additional directory entry for a file, but it can't work outside of it's own filesystem, and it can't reference a directory. They exist, and you may run across them from time to time and wonder what the heck is this? So just know that they are there.
Symbolic links are more modern and more favorable. Think of it as a Window's shortcut. If you remove a symbolic link, only the link is removed, not the original file. I found this short article that explains it well, and gives some examples.
How did you learn the terminal? Got a favorite book, website, or did you learn it all on your own? Tell me about it in the comments or email me at email@example.com. 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.
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.
5 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
8 days ago
#Installing #Solar panels, #Google #Chrome #extensions, and more on @Hak5! http://t.co/QppYLgZpi5
8 days ago
Legalizing #Internet eavesdropping, #LivingSocial is #hacked, and more on this weeks #ThreatWire! http://t.co/xyIxzy8kes
8 days ago
@thescribe I didn't! They were disabled and enabled throughout the segment. Each one has a different icon. - @Snubs
8 days ago
@myraitnetwork thank you!
23 days ago
#PGP #Encrypt your email, back up your #Gmail Account with #Ubuntu, text #messaging your #WiFi #Pineapple On #Hak5! http://t.co/KSZeO4GEPU