What are other useful commands?

QuestionsQuestions8 SkillsProBasic Files OperationsSep, 18 2025
0112

Here are some other useful Linux commands:

  1. List files and directories:

    ls

    Use ls -l for detailed information and ls -a to include hidden files.

  2. Change permissions:

    chmod [permissions] [file]

    Example: chmod 755 myfile changes the permissions of myfile.

  3. Copy files:

    cp [source] [destination]

    Example: cp file.txt /path/to/destination/.

  4. Move or rename files:

    mv [source] [destination]

    Example: mv oldname.txt newname.txt.

  5. Remove files:

    rm [file]

    Use rm -r [directory] to remove a directory and its contents.

  6. View file contents:

    cat [file]

    Use less [file] or more [file] for paginated viewing.

  7. Search for text in files:

    grep [pattern] [file]

    Example: grep "search term" myfile.txt.

  8. Display disk usage:

    df -h

    This shows disk space usage in a human-readable format.

  9. Check memory usage:

    free -h

    This displays memory usage statistics.

  10. Get help for a command:

    man [command]

    Example: man ls shows the manual for the ls command.

These commands are fundamental for navigating and managing files in a Linux environment.

0 Comments

no data
Be the first to share your comment!