Starfighter Starfighter

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
Mission Specialist
Mission Specialist

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 :)


oc edit

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