I’ve got a bash command to find the largest file in a sub-directory. I’d like to save the output to a variable to use it with other commands. bigile=$(find /path/to/directory -type f -exec du -Sh {} + | sort -rh | head -n 1) Unfortunately, this saves both the file size and the filepath. If I pass the variable to
Tag: gnome-terminal
How to take continuous back up of linux gnome terminal logs? commands and output of that command
I want to take continuous backup of logs being printed in my linux terminal. Is it possible that whenever something will be printed in my terminal, it will automatically get printed into some text file with time stamp. Answer Use the script command ie at the start of your session. You can also add this to your bash profile so
How do I get Ctrl-Backspace to delete a word in vim within gnome-terminal?
I’d like Ctrl-Backspace to delete the current word in vim insert mode. From within xterm I can pull this off via but in gnome-terminal I cannot figure out a way to make it happen. When in vim insert mode, if I type control-v and then press backspace, I get ^H in xterm, and ^? in gnome-terminal. Unfortunately, doesn’t do the