File Management

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.

  • directory, remove, file, copy
  • 1 Utilisateurs l'ont trouvée utile
Cette réponse était-elle pertinente?

Articles connexes

How to connect via SSH

Connecting to Your Server (SSH) The first step is to connect to your server using SSH (Secure...

Linux basic commands for navigation

Basic Navigation pwd --Print Working Directory. Shows you the current directory you are in....

Managinfg Your Seedbox (Deluge, rsync etc.)

Typically, you won't directly interact with Deluge or ruTorrent via the command line for...

Managing Your VPS

These commands are more relevant when you have a VPS, giving you more control over the system....

Rootless DOCKER

Rootless Docker (Basic) You can manage Docker containers without needing sudo systemctl --user:...