Linux Basics for hackers p3 and the end of The Chapter. - MuhammadMJabr/S_Linux-Basics-For-Hackers GitHub Wiki
Welcome Again!
We will talk about:
1. File Creation with touch
.
2.Creating a Directory.
3.Copying a File.
4.Renaming a File.
5.Removing a File.
6.Removing a Directory.
touch
:
File Creation with You Can Also Create a file by using the command touch
:
Creating a Directory:
You can use the Command mkdir
to create a new directory, for example:
mkdir newdirectory
And To Open the Dir you Can use cd newdirectory
.
Copying a File:
To copy files, we use the cp
command. This creates a duplicate of the file in the new location and leaves the old one in place:
Renaming a File:
To Rename a file in linux you have to use the command mv
It is mainly used to move files, but you can use it f or renaming by use it mv theoldname.txt thenewname.txt
for example:
it was newfile
but after renaming it to newfile2
it changed.
Removing a File:
For removing a File we use the command rm
+the file name, for example:
Removing a Directory:
For removing a dir you use the command rmdir
it will just remove the empty Directories:
Don't worry, to solve this problem you can use the command rm -r
+ The name of the directory, for example:
الحمدلله, We finished the first chapter, So you have to Practice to master filesystem commands.