User Tools

Site Tools


bash:commands:file_commands

BASH - Commands - File Commands

File and Disk

DescriptionCommand
Change permission of a filechmod 666 filename
Copy file1 to file2cp file1 file2
Copy directory1 to directory2, create directory2 if it does not existcp -r dirname1 dirname2
Create a directorymkdir dirname
Create a symbolic link to a filenameln -s /path/to/filename linkname
Create or update a filetouch filename
Decrypt filegpg filename.gpg
Delete a directory recursivelyrm -r dirname
Delete a directory recursively forcefullyrm -rf dirname
Delete a filerm filename
Delete a file forcefullyrm -f filename
Display all information on files and directoriesls -a
Display path of current directorypwd
Encrypt filegpg -c filename
Execute command lines from standard inputxargs
Output contents of filemore file
Output contents of file as it grows starting with last 10 linestail -f filename
Output first 10 lines of filehead file
Output last 10 lines of filetail file
Place standard input into a filecat > filename
Print the number of chars, words and lines in a filewc filename

bash/commands/file_commands.txt · Last modified: 2021/01/26 15:37 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki