cancel
Showing results for 
Search instead for 
Did you mean: 
DavidOBrien
Flight Engineer
Flight Engineer
  • 622 Views

Which really useful command did you learn today?

Linux is full of really useful commands, and I discover new ones all the time. Today I learned this:

$ > filename

Why is this useful? In my case, <filename> already existed but I wanted it to remain and be completely empty. I toyed with echo and touch but that left a space in the file or took too many keystrokes (I'm lazy):

$ echo '' > filename
$ rm filename; touch filename

This simple command left me with exactly what I needed.

So, what really useful command did you learn today? 

Labels (1)
0 Kudos
1 Reply
josemdiaza
Mission Specialist
Mission Specialist
  • 617 Views

Re: Which really useful command did you learn today?

Very intersting. Today I learned how to use the oc subcommand edit. You can edit a YAML or JSON resource with edit. It prompts a Vim interface to edit and commit the changes Smiley Happy

 

oc edit

0 Kudos
Reply
Loading...
Join the discussion
You must log in to join this conversation.