How to get rid of ^M in text files using vi. :1,$ s’^M”g But how to get this ‘^M’ in the command line: Keep CTRL pressed and then press v and m
In the .login file add the commands: ———————————— echo login time `date` >> .daylogs/masterlog grep -i “sun” .daylogs/masterlog > .daylogs/sunday.log grep -i “mon” .daylogs/masterlog > .daylogs/monday.log grep -i “tue” .daylogs/masterlog > .daylogs/tuesday.log grep -i “wen” .daylogs/masterlog > .daylogs/wensday.log grep -i “thu” .daylogs/masterlog > .daylogs/thursday.log grep -i “fri” .daylogs/masterlog > .daylogs/friday.log grep -i “sat” .daylogs/masterlog >…
Various unix processes can produce fast growing logs that sometimes need to be trimmed instead of deleted, for reference or troubleshooting. And you likely have no desire to edit the files. Here is a handy ksh script that will quickly trim the log so it keeps recent information and lets you keep as many lines…
For showing the banner on a telnet session. Add the following in /etc/inetd.conf telnet stream tcp nowait root /usr/lbin/telnetd telnetd -b /etc/issue The -b option then the banner file after this allow inetd to reread the conf file by , inetd -c. After this you will be getting your banner on telnet session.
Automatic file transfer through a script between machines using FTP. If one wants to transfer files between UNIX machines, here are the steps to follow. 1. The .netrc file a. create .netrc in the home directory. b. add this line machine login password e.g. machine abc.mydomain.com login deepak password deep123 c. chmod 600 .netrc 2.…