MAS Linux Commands
From DDCIDeos
Jump to navigationJump to search
Useful Links
BASHRC File
The .bashrc file is located in your root directory. The following modifications are recommended:
- Add lots of alias commands to make your life easier. Examples:
- Pathnames to frequently accessed folders:
alias a653_mainline='cd ~/scm/Deos/products/arinc653/runtime/branches/mainline && pwd'
- Pathnames to frequently accessed folders:
- Display the project name in the title bar of the window (useful in cygwin/BASH):
DESK_NAME=`cygpath -m $DESKHOME | sed -e "s/.*\/\(.*\)\/desk$/\1/"` # setup the prompt. Don't use the default because that will mess with the title of the window export PS1="\[\e]0;"$DESK_NAME" \w\a\e[32m\u@\h \e[33m\w\e[0m\]\n$ "
Load .bashrc Settings
After updates are made to the .bashrc file, you can load/activate the updates by running the following command:
source .bashrc
NOTE: An alternate method to loading the new settings is to log out and log back in, but that is less interesting (and slower) than using the source command.
Useful Linux Commands
| Linux Command | Description |
|---|---|
dpkg -S /desk/<path>/<filename.ext> |
Indicates the package that a file (or folder) belongs to. Example:
|
dpm <path>/<libname.so> |
Display the CRC/Integrity key of a library. Examples:
|
dos2unix <filename.ext> |
Convert a DOS-based line-ending file (e.g. CRLF) to unix line-ending format (e.g. LF) |
find /desk -iname '<keyword>*' |
Search the /desk folders (and subfolders) for a filename containing the specified "keyword". Example:find /desk -iname 'traceaid*'
|
grep -r <keyword> <path> |
Basic search within the path (and subfolders) for a file containing the specified "keyword" |
grep -rnl -e <keyword> /desk |
Search the /desk folder (and subfolders) for a file containing the specified "keyword". NOTE: you can specify multiple keywords by repeating -e <keyword> arguments |
pwd |
Display the current directory path (Print Working Directory) |
wc <filename.ext> |
Display the line numbers, words, and byte count |