- Better Together: How MFA and Strong Password Practices Can Help Bolster Security
- “美 CISO 평균 연봉 6억,상위 1%는 60억원 넘어···보안 예산은 여전히 부족” IANS 설문조사
- 아웃시스템즈, 매출 5억 유로 돌파 및 신임 CEO 선임 발표
- 정철환 칼럼 | 변화의 바람에 맞설 것인가? 따를 것인가?
- Best home automation systems 2025: I'm a smart home reviewer and these are the top ones
How to get rid of unneeded files on Linux

Using the rmdir command
The rmdir command will remove a directory, but only if it’s empty. To remove the directory and its contents, you need to use a recursive command like that shown below.
Recursive rm
The rm command can be used with an option that allows you to remove an entire directory with a single command. This assumes, of course, that the files are all yours. The rm -r command will run through a directory, remove its contents, and then remove the directory itself.
Using the shred command
Removing a file from a directory does not wipe its contents from the disk even thought the file will no longer be visible or available. That disk space will in time likely be overwritten with other data. However, if you’re removing a file that contains sensitive information, it’s a good idea to use the shred command prior to removing it. That way, the content will have been left in an unrecoverable form.
Using >
Using a command like > myfile will empty a file without removing it from the system. You will then be able to fill it with new content. The cat /dev/null > myfile command will do the same thing, but using just > is easier.
You can also use > to add the output from a command to a file. This will overwrite any prior contents, so use >> if you want to add to the file instead.
$ > oldfile $ date >> oldfile
Using unlink
The unlink command will only remove a single file. Unlinked files cannot be fully recovered. This command accepts two options, but only –help and –version. Both are outlined in the man page.