• 5) Delete the file
  • 6) Move or rename files
  • 7) View the file
  • 8) Head Command
  • 9) Tail Command
  • Linux: This Book Includes 4 Manuscripts. The Underground Bible to the unix operating System with Tools On Security and Kali Hacking to Understand Computer Programming, Data Science and Command Line




    Download 6,34 Mb.
    Pdf ko'rish
    bet157/203
    Sana10.01.2024
    Hajmi6,34 Mb.
    #134102
    1   ...   153   154   155   156   157   158   159   160   ...   203
    Bog'liq
    Linux This Book Includes 4 Manuscripts The Underground Bible

    4) Touch to Create Command
    Linux uses various methods or commands to process files. Here we will
    explain about creating a new file of any type using touch command.
    Linux can create a lot of file types such as .txt or.MP3 by using the touch
    command as shown below using the command.
    First of all, you need to be in the directory you wish to create the file and
    then enter in the following way: 
    vulnerhost @ example: touch sample.mp3
    After entering the check command, you can recheck using the -l command
    for viewing the files in a current directory.
    5) Delete the file 
    Deleting a file is a basic task any hacker would need to learn. In windows,
    you can delete with a click, but Linux offers a special security layer that


    will not let you delete any system files such as log files. To remove any
    files, you need to use the rm command as shown in the following example
    vulnerhost @ example: del example.gif
    6) Move or rename files
    Linux provides a command that can be used for both moving and renaming
    files. Moving files may become essential to hide forensic investigators
    about the attack you have done. It may be also a lifesaver to easily get
    sensitive information. 
    This command can also be used to rename files. Below is the example that
    describes the following two use cases:
    vulnerhost @ example : mv example.gif
    [for moving the file]
    vulnerhost @ example : mv example.gf to report.gif
    [for renaming the files]
    7) View the file
    Normally text editors or IDEs can be used to view the file content. Certain
    file types for suppose like an MP3 can be opened by a music player
    software. However, Linux provides a command called the cat that will let us
    read the file in the same way that Linux kernel reads it. Below is the
    command for the cat command with an example.
    vulnerhost @ example: cat songs.tx t
    8) Head Command
    Normally files consist of a lot of information and can cause crashes will
    opening using the cat command. To get rid of this disadvantage you can just
    see the first 10 lines of any file using the head command. This will help for
    a fast recheck of log files when there is an attack or delete your login
    information when you are the attacker.


    Below is the command to view the file:
    vulnerhost @ example: head songs.txt
    9) Tail Command
    If the head command lets the users see the first 10 lines of the files, the tail
    lets the users see the bottom 10 lines of the code. This can be used to easily
    organize the system programs by using their results or to see the final result
    of the system processes. 
    Here is an example that describes the following command:
    vulnerhost @ example: tail songs.txt

    Download 6,34 Mb.
    1   ...   153   154   155   156   157   158   159   160   ...   203




    Download 6,34 Mb.
    Pdf ko'rish

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    Linux: This Book Includes 4 Manuscripts. The Underground Bible to the unix operating System with Tools On Security and Kali Hacking to Understand Computer Programming, Data Science and Command Line

    Download 6,34 Mb.
    Pdf ko'rish