Login
Remember
Register
Askocloud Q&A
All Activity
Q&A
Questions
Hot!
Unanswered
Tags
Users
Ask a Question
About
Ask a Question
How to empty a file in linux
0
votes
19
views
asked
Jan 30
in
Linux
by
jos moore
I am a developer and most of the I need to clear log files to test my applications, eg: I need to clear laravel.log, and I have to access the file and delete the content manually, is there any way we can do it easily
bash
linux-command
linux
file
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jan 30
by
cloudsinger
You can use the echo command to empty a file, if you want to clear laravel.log then use below command, access the file location using the command "cd" then use
echo " " > laravel.log
It will remove all the log entries and make it an empty file
Please
log in
or
register
to add a comment.
Welcome to Askocloud Q&A, A Forum for server support Engineers where you can ask questions and receive answers from other members of the community.
Related questions
How to test UDP port connection from linux
How can I terminate a shell script
Find a file in linux
clear the output of a command in bash
SIGINT signal in linux
What is Freshclam and how is it used
How do you install Lynx on a Linux system
What is lynx, and how can it be used in Linux
command that only work with libwww-perl library
What is libwww-perl
GET command working
UDP port connection test
...