What other file commands exist?

0105

Here are some common file commands in Linux:

  1. ls: Lists files and directories in the current directory.

    ls
  2. cp: Copies files or directories.

    cp source.txt destination.txt
  3. mv: Moves or renames files or directories.

    mv oldname.txt newname.txt
  4. rm: Removes (deletes) files or directories.

    rm file.txt
  5. mkdir: Creates a new directory.

    mkdir new_directory
  6. rmdir: Removes an empty directory.

    rmdir empty_directory
  7. cat: Displays the contents of a file.

    cat file.txt
  8. echo: Writes text to a file or displays it in the terminal.

    echo "Hello, World!" > file.txt
  9. chmod: Changes file permissions.

    chmod 755 file.txt
  10. chown: Changes file ownership.

    chown user:group file.txt

These commands are fundamental for file management in Linux. If you need more details on any specific command, feel free to ask!

0 Comments

no data
Be the first to share your comment!