File Creation in Terminal?

Discussion in 'Linux Beginners' started by Dylan01, Sep 11, 2023.

  1. Dylan01

    Dylan01 New Member

    I'm pretty new to Linux and was trying to learn a few commands. I came across a few commands that can create files which are touch, cat, and echo. None of which are involved in just creating a file. I was wondering why there isn't a command like mkfile or something similar.
     
  2. HSorgYves

    HSorgYves Active Member HowtoForge Supporter

    touch is mkfile isn't it?
     
    Dylan01, ahrasis and Th0m like this.
  3. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Code:
    $ alias mkfile='touch'
    $ LANG=C type -a mkfile
    mkfile is aliased to `touch'
    
    
     
    Dylan01 likes this.
  4. Dylan01

    Dylan01 New Member

    Yeah, you're right. I was just wondering why, since the "main" functionality of the touch command was to update the modification and access dates.


    Oh that's really cool, I didn't know you could create your own aliases. This is really useful, thank you.
     

Share This Page