There are some commands that the only root is authorized to execute. We will use the chmod command to give all permission to everyone. The file has read and run permission to the owner, read permission to the group and read permission to others. The chmod command is used when we have to change the permission of any file. The user name can be seen in the red text on the left side of the dollar mark. In the below picture, we will be able to see that the current user is Vishal, and after we used the su command to login as root, the user name will be changed. Su command is used when we need to switch the user. Please note that if you try to move the file in the same folder, it will rename it, and if you try to move it to another directory, it will get moved there. Here we will rename the page.html file to newpage.html. The mv command can be used for two purposes, for renaming and for moving file or folder. In the second line, it shows test.css present there, but after running the rm command, that file has been removed. In our case, we are at Desktop that has the test.css file Now, we will try to delete that file using the rm command. The rm command is used to delete the files at your current location. Here we will add extra data in the test.css file. Regardless of the size and type of the file, we can edit those using the Vi command if they have text written on it. Vi command is the most useful command that is used to fetch the data written on any file on the terminal and also let us make the changes at the same time. We will see what is written on that file using the cat command. We have seen that in the desktop location, we have a file names test.css. It could also be used to append the data in the file and can overwrite on it. In the below image, you can see that in the second line, the newdir is present, but after we executed the rmdir command, it has deleted the newdir folder.Ĭat command is used to read the data written on any file. This command will be used to remove the directory. The directory could be witnesses in blue color. In the below image, we are at the Desktop and using the mkdir command to create a directory named “newdir” there. This Unix command is used to make a new directory at your current location. The below picture shows the before and after images while using the clear command. It doesn’t delete anything written on the screen but just makes the current line to look like it is the first line. This command is used to clear the screen. The current location could be seen in the blue text that is just previous to the dollar sign. This Unix command is used to show all the files and folders at your current location.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |