Skip to main content

Posts

Showing posts from February, 2019

Linux folder with special characters

Operating system or even applications programs does restrict some characters since it's either used by the system or it is not permitted for some other reasons. In Linux special characters like ampersand, dashes and other special characters should not be used as folder names or even file names. But some users or even IT folks violate this rule without knowing the consequences it holds. Of course, whatever characters available on the keyboard should be used or else what's the point of having them on the keyboard. :) But there are consequences in using those mentioned characters. In Linux terminal, if the folder name has an ampersand on its folder name like the image below it cannot be copied easily. For example navigating in Linux through the terminal using "cd" should be smooth but sometimes simple things can be tough if you don't know how to get around with it. Navigating folders with special characters using "cd " command is quite sim...

Empty log or replace large files

Log files can easily occupy the space of a drive. If the log files is collecting or monitoring multiple system then chances are it will grow in size very quickly. If it the log file is in a text format, even if it comes in Giga or Tera bytes size it can be emptied very quickly in a command line. If the log files has been analyzed or not in use anymore, then it is a good candidate to get rid of it rather than occupy the space of a drive for nothing. To empty a log file or a text file: In Windows open command prompt and type: echo "First Line" > Packets_2018.log The log file will be replace with the word "First Line" and only a few bytes in size. Whatever was the content before on that log file is ditch away. So, be careful in emptying a file it's not reversible, In Linux open Terminal and type: echo "Line 1" > Packet_logstash.log Till next time..Cheers! ================================ Free Android Apps: ...