Linux Command: script

script command is used to make a typescript or record of everything printed on your terminal. It is useful for anyone who need a hardcopy record of an interactive session as proof and the typescript file can be printed out with lpr command.


script — Start the recording in a default file. i.e typescript

script — Start the recording in specified file name

script -a — Start the recording in append mode

Ctrl+d — Stop the recording

Use cat command to open the file.

For more see the command’s man page.

Add Nastran Syntax File in VIM Editor

Follow the below steps to add Nastran Syntax file in vim editor.

1. Find out nastran.vim file location in your Linux system. In most of the cases, it will be located at /usr/share/vim/vim/syntax[version]/nastran.vim. This is file is installed from “vim-common” rpm.

2. Create Nastran filetype in your .vimrc file

au BufRead,BufNewFile *.bdf set filetype=Nastran

Continue reading

Disable USB HDD Standby Mode

Below steps can help you to disable USB HDD standby flag

To get device report

$ sudo sdparm -a /dev/sde
/dev/sde: Seagate   FreeAgent Pro  400A
Power condition mode page:
IDLE        0  [cha: n, def:  0, sav:  0]
 STANDBY     1  [cha: y, def:  1, sav:  1]              <– 1 – standby flag is enabled
ICT         0  [cha: n, def:  0, sav:  0]
SCT       9000  [cha: y, def:9000, sav:9000]

Continue reading