The 'truncate' Command In Linux

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Note: truncate is useful to create an empty (sparse) file, since the blocks will not be actually written to disk. Very often used to create an empty image file or preallocating a database file. Also useful to truncating a log file without having to delete the file or mess with existing setup, since it will keep hard links intact.

der.Schtefan
Автор

I used this command on all of our files at work and now we're saving a ton of money on storage space. Thanks bud!

skeggs
Автор

fun fact about the truncate command: it is an actual filesystem operation and does not cause overhead. it will simply change filesystem allocation for said inodes.
been using this in 2011 for an assignment in which i wrote a database management system from scratch in c

GottZ
Автор

Is it just me or does he have a lot of favorites lol

lolydodo
Автор

i just love the way he talks it's so comfy and relaxing

jacobham
Автор

I like these shorts, keep them coming ❤

_ba_
Автор

📺💬 To support our reasons the truncate command is a powerful command I used the truncate commands to truncate the file and addition the supportive function.
🧸💬 You are correct I give one example to support that before they use license games that can limits the stages played or function by truncating from the original DAT file that is because it is not supposed to directly compare files in the local drive directly.

Jirayu.Kaewprateep
Автор

Sometimes I use it to create a nonce file with "shred". If I want a file with random bytes of exactly size 400M I can do "truncate -s 400M file; shred -n1 file". I could use dd but I have a superstition that setting the wrong block size will be bad. I refuse to find out

XmungaM
Автор

what about the -o, -c, and -r. I dont understand any of them

fuzzy-
Автор

does this modify the fine or return the value?

NithinJune
Автор

keep doing videos like that ..Hacking satellite

MoroDZGamer
Автор

i know shorts isn't the best place to ask but when is this command useful at all? Maybe some black hat hackers use it to bypass some scanners that can't scan a large file. I can't think of anything else

_ba_
Автор

The 'truncate' Command In Linux is my favourite short from @RobertElderSoftware

travisSimon
Автор

echo "" 1> readme.txt would'nt that do the same

aytuncdemir