Notes by Peter Galonza(Пётр Галонза)
GitHub Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Files

Encoding

iconv -f cp1251 -t utf8
file -bi

Determine file type

file file_name

Display file or file system information

stat <file path|filesystem path>

Display ELF-file information

readelf -a <file path|filesystem path>

Show header of file

cat /usr/bin/python3.9 | hexdump -C | head

Compare files

comm

Merge files

paste

Clean file

truncate -s 0 <file_name>
echo '' > <file_name>
> <file_name>
cat /dev/null > <file_name>
true | tee <file_name>
dd if=/dev/null of=<file_name>
shred <file_name>
shred -zu <file_name>

Translate or delete characters

tr

Show inodes

ls -i <file path>

Show file system where file

df file path>

Print the locate of binary

type -a command
whereis command
which command

Show all symbols

cat -A file_name