• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Caleb Curry

Making Money and Investing

  • Home
  • Make Money Online
  • How to Buy Bitcoin
  • Get Started with Real Estate Investing
  • How to Start a Website
  • Courses
    • Full Time Income Online
  • Sponsorship

C Programming Tutorial 7 – Intro to UNIX/Linux – Part 2

October 17, 2018 by Caleb Curry Leave a Comment

Don’t forget to read the last blog on Intro to UNIX/Linux Part 1! Are you new here? Start from the beginning of the series!

In the last blog we talked a bit about navigating around Linux  In this blog I wanted to go in a bit more depth. You can imagine the Linux filing system as a tree. When you run pwd, you get the absolute path of where you are. There are important terms relating to paths that you should know.

When someone says the root directory, they are referring to the very first directory. To get to the very first directory you can type:

Another important directory is called the home directory.

This is the directory for your user. This is the default directory that opens when you open a terminal. There is an easier way to go to the home directory though:

The tilde is a trick you can use that refers to your home directory. You can also reference stuff relative to the home directory.

This introduces the concept of relative directories. We can reference a directory in relation to other directories. We actually already did an example of this when we did:

This is saying to move one directory up. We don’t necessarily have to start from the root directory. We can also get more complex… such as:

We are going a bit out of scope of intro to Linux, so let’s get back on track.

Let’s go to the home directory:

We can create a file using:

We can move a file using the mv command. For example:

We can rename a file using this same command:

We can delete a file with:

Conclusion

I think we are going beyond the scope of this blog though, so that’s all I’m going to say for now!

I hope this blog was helpful to you! Check out the next blog as we discuss more on UNIX and Linux!

Did you know that this blog series is also a video series?! Check out the video that goes with this blog, below!

https://youtu.be/2sAqu2VoJCQ

Filed Under: Uncategorized Tagged With: c programming, intro to UNIX/Linux

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

my face to show my face

My name is Caleb Curry and I started my online business teaching software development and doing digital marketing for brands. Entrepreneurship has changed my life and has allowed me to earn a full time living from anywhere. I now have the freedom and energy to pursue skills and opportunities that I find interesting. This website is all about my journey.

Get my top Python Tips and Tricks

50+ Python Tips and Tricks!

Subscribe to our newsletter to get notes and latest content by email.

    We won't send you spam. Unsubscribe at any time.

    Follow Me!

    • Instagram
    • YouTube

    Recent Posts

    Copyright © 2021 · Genesis Sample on Genesis Framework · WordPress · Log in