File Management

From Pulsed Media Wiki
Revision as of 17:17, 17 April 2025 by Gallogeta (talk | contribs) (Created page with " == File Management (As User)== Using SSH '''mkdir new_directory'''     --Make Directory. Creates a new directory with the specified name. '''rmdir empty_directory''' ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

File Management (As User)

Using SSH

mkdir new_directory     --Make Directory. Creates a new directory with the specified name.

rmdir empty_directory   --Remove Directory. Removes an empty directory.

rm file_nameRemove            --Deletes the specified file. Use with caution!

rm -r directory_name    --Removes a directory and its contents recursively. Be very careful with this command!

cp source_file destination_fileCopy  -- Copies a file from the source to the destination.

cp -r source_directory destination_directory  --Copies a directory and its contents recursively.

mv old_name new_nameMove --Renames a file or directory.

mv source_file destination_directory  --Moves a file to the specified directory.

touch new_file --Creates an empty file.

cat file_name --Displays the content of a file on the terminal.

less file_name --Displays the content of a file page by page, allowing you to navigate. Press q to quit.

head file_name --Displays the first few lines of a file.

tail file_name --Displays the last few lines of a file.

tail -f file_name --Displays the last few lines of a file and continues to show new lines as they are added (useful for monitoring logs). Press Ctrl + C to stop.