Here are some common file commands in Linux:
-
ls: Lists files and directories in the current directory.ls -
cp: Copies files or directories.cp source.txt destination.txt -
mv: Moves or renames files or directories.mv oldname.txt newname.txt -
rm: Removes (deletes) files or directories.rm file.txt -
mkdir: Creates a new directory.mkdir new_directory -
rmdir: Removes an empty directory.rmdir empty_directory -
cat: Displays the contents of a file.cat file.txt -
echo: Writes text to a file or displays it in the terminal.echo "Hello, World!" > file.txt -
chmod: Changes file permissions.chmod 755 file.txt -
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!
