Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

create file in linux

touch <filename>.<extension>
Comment

create file in linux

sudo nano <filename.extension>

Example:
cd /
cd /var/www/html
sudo nano Form.php
Comment

linux make file

touch file1.txt #Create file1.txt
Comment

linux terminal create file

/* only create file */
touch myFile.html

/* create and open to edit */
nano myFile.html
vim myFile.html
Comment

linux create file

#solution 1
touch filename

#solution 2
> filename # or >> filename

#solution 3
cat > filename
Comment

create file linux

//will create test.txt
sudo touch test.txt
Comment

creating new files in linux

// To create a new file run the cat command followed by the redirection operator > and the name of the file you want to create.
// Press Enter type the text and once you are done press the CRTL+D to save the files.
cat > file1.txt
Comment

PREVIOUS NEXT
Code Example
Shell :: copy one file content to another in linux 
Shell :: create git tags 
Shell :: ubuntu install latest vim 
Shell :: enable site 
Shell :: how to install openvpn connect on ubuntu 20.04 
Shell :: git push local repo to remote 
Shell :: how to create a sh file to run terminal commands 
Shell :: change desktop icon size ubuntu 
Shell :: open current directory 
Shell :: gitignore file download 
Shell :: git fetch upstream 
Shell :: gitignore criar 
Shell :: get only file names from CMD 
Shell :: linux change file owner 
Shell :: search for ADS 
Shell :: why installing pandas take time in docker 
Shell :: xbox 360 wireless adapter linux 
Shell :: start grafana server wsl 
Shell :: rename branch in git 
Shell :: apache not restart 
Shell :: how to get all avd names in cmd 
Shell :: apt-get search package 
Shell :: copy everything vim 
Shell :: osx update host file 
Shell :: github ignore files 
Shell :: Delete all linux package 
Shell :: how to connect to a git repo in cmd 
Shell :: it is required that your private key files are not accessible by others ubuntu 
Shell :: install git bash in ubuntu 
Shell :: delete playerprefs with new application install unity 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =