Use the -n option:
cat -n pom.xml
You can now grep over the output for that particular line number you’d like to see. Avoid annoying lessing and searching for manually.
I guess the title of the post is self-explanatory:
Reference. It’s actually -h the option doing the trick here. The others are for listing the files with details (-l) and showing the hidden ones too (-a).
Invest half an hour of your life watching these videos. It’s worthy. The vi editor is built-in on any single Unix / Linux operating system distribution I’ve seen in my life.
Through these four basic videos you will learn how to enter vi, switch from the command to the insert mode and viceversa, how to navigate through a file and how to insert and delete text on it.
Thanks to devdaily for this.
If you try to edit a user’s crontab and get this error:
”crontab: you are not authorized to use cron. Sorry.”
You need to log in as root and edit a config file to add the user that you want to access Cron too:
# vi /usr/lib/cron/cron.allow
We add the user:
root user1 user2
We save & close.
Now we log in with the user and we are able to access its crontab:
$ crontab -e