Skip to content
Advertisement

Tag: less-unix

For zless to read empty gz file

I have tried to use zless to read (.gz) files. However, when (.gz) file is empty, it shows a message How to force zless to read an empty gz file without typing Y for many times. or Is that possible to return something like Answer zless is just a wrapper around less. You need to look at man less: -f

Python shell script open less with +F option

I have the following Python script, all seems to work how I want it to, except for the following: less opens with the option -F, this will follow the file like Tail would. to inspect (move through) the file the user has to ctrl + c to send an interrrupt. when sending the ctrl +c (interrupt) this gets send to

Adding additional newline between each line

I am analyzing log files from my server(particular few lines from there). But those lines are having around 1000 to 2000 characters in length. Here is an example how the lines are coming out with grep and less with following command. Output: But its hard for me to separate them as those are screen full of texts(also not pleasant for

PHP run linux “less” command via exec – binary file warning

I have to convert some PDF files to TXT. I end up with “less” command, because for example pdftotext has some problems with tables in PDF. The problem is that when I ran the command from exec function (or shell_exec/system), less just showing me information, that selected PDF is binary file and result file is just TXT with PDF data

xterm keep page from less in terminal after exit

I often view files using less and want to remember what i have just seen in the file. However when I quit less by pressing the q key my xterm window removes the page of less showing the file and only shows my command prompt. How do I keep the less output on my terminal when I quit? Answer less

Advertisement