Creating a new file or directory in LAMP?
How do I create a directory in the LAMP root folder (var/www) using the terminal and LAMP. I'm just getting to grips at using Linux/Ubuntu and I've just setup LAMP so I'm still not to sure on how I can do this.
Once I've setup the directory how can I create sub-folders (images, css, includes, etc) within that folder/directory. Then create a .php, .css and maybe .js files and save them into the root directory and sub-folders?
mkdir is the linux function you want
reading up on the basics of linux would be a good idea
Steps per line:
- Create a directory called "mysite" under /var/www: "mkdir /var/www/mysite"
- Change working directory to /var/www/mysite: "cd /var/www/mysite"
- Open editor called "vile" and start with a new document called "index.php": "vi index.php"
For help with the vile editor, http://linux.die.net/man/1/vi
If you want to create a textual file, you could use an editor like e.g. emacs