Linux Tips and Tricks

Blog_Linux_Hings_FeaturedImage

Introduction

Here is a collection of Linux commands that I find useful:
  • Search for all inp-files that contain the text “PENALTY” (case insensitive)
    grep --include=\*.inp -rnwli ~ -e "PENALTY"
  • List what hosts are active on the local network:
    arp-scan -l
    nmap -sn 192.168.86.0/24
  • Debugging a core dump:
    gdb executable core
    thread apply all bt
  • To determine if a Redhat / CentOS computer needs to be rebooted:
    sudo needs-restarting -r
  • Enable core dumps on Redhat / CentOS. As root type (needs to be done after each reboot):
    echo /tmp/core-%e-sig%s-user%u-group%g-pid%p-time%t > /proc/sys/kernel/core_pattern
  • Split and combine HUGE files:
    split --verbose -b1G file.tar file.tar.
    cat file.tar.* > file.tar
  • Update PolyUMod and MCalibration files (the \ before cp runs the command without any alias):
    cd PolyUMod_Installer_Lin64_vX.X.X/files
    \cp -r -p * /opt/PolymerFEM/
  • Run ANSYS in batch mode from a Windows PowerShell:
    C:/"Program Files"/"ANSYS Inc"/v192/ansys/bin/winx64/ANSYS192.exe -b -i simulation.dat -o job.output -j job
In the comments below, indicate what important (and “tricky”) commands that you would like to add!
Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

More to explore

Leave a Comment