Using command options and arguments to get just the right output on Linux
This post covers some well-known Linux commands that, when used with particular options and arguments, can save you some time or ensure that what you are doing is what you intended. The first “trick” involves how you exit vi or vim and the difference that can make.Using :x instead of :wq when saving files with vi or vim The vi and vim editors are the most commonly used text editors on Linux systems. When you exit either with :x instead of the more common :wq, the file will only be saved if you have just made changes to it. This can be helpful if you want to ensure that the file’s timestamp reflects its most recent changes. Just keep in mind that, if you make a change to a file and then undo those changes – like deleting a word or a line and then replacing it with the same content, this will still be seen as a change and vi or vim will save the file, updating the timestamp whether you use :x or :wq.To read this article in full, please click here

