Hello, in this linux commands tutorial i will discuss about some basic linux command which i think every user should know. If you are a developer then it is must needed thing that need to know about some basic linux command.
So let's see some linux commands with examples and syntax. I will give an example with command and code. Let's see one after another.
Create a New File :
To create a new file, use
To create multiple files, can be done with the help of
touch file_2.txt && touch file_3.txt
Create New Directory:
To create a new directory, use
To create a new directory, use mkdir command.
Read a File:
There are many ways to read a file like
The second way of reading a file is using
Edit a File:
To edit a file can be done using text editor or related application with the file's type. In this example, the file with
.txt extension is edited with text editor using
Open a file with
Edit file and then Save the file's changes with
X then confirm by pressing
Y. After that, hit
To view a list of files can be done by using
Move and Copy File:
Wanna move a certain file, use
mv command followed with target file and target directory. In this example, the file called
file.txt moved to the
mv file.txt mydirectory
Wanna copy a certain file, use
cp command followed with target file and target directory.
cp file_2.txt mydirectory
Remove File and Directory:
Wanna remove certain file, use
rm command followed with file name.
To remove a directory, use
rmdir command followed with directory name.
To remove a directory and its content. Use
rm -rf directory_name
Want to change the file or directory ownership, use
chown command followed with user's name.
chown cool.txt other_user
Wanna learn more about specific commands, just add
Hope it can help you.
#linux-command #bash-command #unix-command