Computer Scientists are Pretty Pessimistic

Linux Commands


 #Group 1 Commands
  •   pwd -> present working directory. To see in which directory you are now.
    From the above image, you can see that the user is now at /home/imtiyaz/Desktop directory.
  •  ls -> It will show list of the directories and files of present directory. 
  • ls -l -> It will show list of the directories and files in detail of present directory.
    Here you can see that some directory start with d and some are
      • d indicates it is a directory
      • - indicates it is a file 
  •  ls -a ->  will show all hidden files also.
  •  ls -al -> will show hidden files and others files in detail.
  •  cat filename -> will show all data in that file on terminal.
  •  gedit filename -> open file in gedit text editor if there have no file with that filename it will create new file with that name. 
#Change Directory 
      • cd directory_name/directory_path -> cd means change directory. if you want to go any root directory you have to give back slash(/) like cd /home/imtiyaz/Downloads. Because home directory is under root.
      • cd / -> jump to root directory directly.
      • cd ~ -> jump to user directory directly
      • cd .. -> go to one step back directory
      #Create & Remove File and Directory
      • mkdir directory_name -> mkdir means make directory. create a new directory of given directory name.
      • touch filename -> creates a file. by default it creates a text file.
      • touch file1 file2 file3 -> you can create multiple file like this.
      • gedit filename -> will create a new file and also open it with gedit text editor.
      • rm filename ->  rm means remove. by this command you can remove a file.
      • rm -f filename -> here f means forcefully. it will remove a file forcefully means that there have some files that can't be deleted, that file will be deleted by this command.
      • rm -r directory_name -> to delete a directory we have to use r in command. r means recursively.

          No comments:

          Post a Comment