Here are the commands I often use when editing and executing LS-DYNA files on a Linux cluster.
ls -trl
--Displays the file update history line by line in long format so that ** the bottom is the latest history **. --When turning LS_DYNA, this command checks whether the glstat, binout, and d3plot files have been updated, and confirms that the analysis has started.
[Supplement]
-l
: Show files line by line in long format-r
: Display in reverse order-t
: Show files in update order (top of list is latest-> -r to bottom of list to latest file)
--It is convenient to register alias lt ='ls -trl'
in .bashrc. You can do the same with lt
as ls -trl
--For aliases, I referred to @ _ydah's article. [Linux] Alias setting method
---F
: Display file type
--File directories are displayed with a symbol after the directory, such as dir /
run @
exe *
.
symbol | meaning |
---|---|
/ | directory |
@ | Symbolic link |
* | Executable file (Files with executable permissions) |
No sign | Normal file |
---a
: Show all files including hidden files
history | grep hogehoge
--The above displays a history list of past commands including * hogehoge *
--I often use the cluster I'm using because it has long commands like qsub -W denendancy = any: hogehoge
and I can't remember it.
After the above command, in the history list
>594: qsub -W hogehoge
Is displayed. After that, you can execute the command by typing the command as shown below.
!594
grep -i error mes* log
--If the mes * and log files contain the word "error" (case insensitive), display the file name.
-i
: Case insensitive*
: Wildcard
tail -n 15 mes* log d3hsp| less
-* mes \ * log d3hps * Look at the last 15 lines of the file and show it to less
find . -name ".key"
grep -i *contact '!!'
The first command gets a list of * .key * files in the current directory ** and below **.
The second command returns the part of the file list obtained in the first that contains the word "contact".
'!!'
refers to the previous command.
Maybe you can do the same with the command below.
find . -name "*.key" | xargs grep -l -i 'contact'
--ctrl + a
: Move cursor to the beginning of the current command
--ctrl + k
: Delete after from the current cursor position (blinking part)
--ctrl + a-> ctrl + k to erase all currently written commands
--ctrl + d
: Delete the character at the current cursor position
--ctrl + l
: Organize terminal display
--The current command line has moved to the top of the terminal.
-- chmod 777 MPP.sh
: Grant permissions to MPP.sh (execute / write / read)
--touch d3kil
: Create an empty file d3kil
in the current directory (cd)
--mkdir TEST
: Create TEST directory on cd
--cp -r hogedir hogedir2
: Copy the entire contents of the directory with hogedir as hogedir2
--mv log log_old
: Rename log file (without extension) to log_old
-- vi fugafuga.key
: Open fugafuga.key
with vim
--The vim commands are summarized in This article ~ vim command memorandum ~.
Recommended Posts