Some Linux Command && Tools

  • Record Some of the Linux Commands and Useful Tools For further use
  • Ready to insert some code with other language (Web Assamblely? No idea yet~)

Linux Commands && Packages/Tools Used Recently

Linux $PATH Configure

Normally written in .bashrc or .bash_profile
The $PATH is really important for searching for excutable commands and as for configuration, we should not forget to avoid over-writting the origin PATH

1
2
$ echo $PATH  // For check the present path
$ export PATH="xx/xx/xxx/bin:$PATH" // Add the new path in the front

  • Do not forget the $PATH
  • “:” is used for seperate two paths and conbine into the new path

Python Environment && Pip && Conda

The Anaconda Provides the feature to set a virtual environment for python development.

  • Be aware of the difference between python -m xxxx and python xxxx
  • The python environment create =>

    1
    $ conda create -n XXXXX python=X.X
  • The Usage of the environment =>

    1
    2
    3
    4
    5
    $ source activate XXXX(The name you created before)
    $ conda install -n XXXX [package]
    $ source disactivate XXXX
    $ conda remove -n XXXX -all
    $ ...
  • The Installation of the Packages from Third Party is Recommanded to install in the Virtual Environment instead of Global SUDO commands !!! (impoertant)

Nload

Display the network usage status with TUI

Objdump

Displays information about one or more object files. The options control what particular information to display.

Du && Df

List the size of a dir and the file.

Convert (.JPG -> .GIF)

Well, a well known command line tool from ImageMagick

This time for the jpgs to transform into gif =>

1
$ convert -delay 20 -loop 0 *.jpg ttfish.gif

Ffmpeg

A Useful Stream Video Convertor (.m3u8 FILE transition)

1
$ ffmpeg -i "remote_address" -c copy ttfish.mp4

File

Check the specific type of a file.

Nm

List the symbols from object files objfile. If no object files are listed as arguments, nm assumes the file a.out.

To be continued…

Share