Bibliography Collection
For the full name of journals and venue information of conferences, click Conference and Journal Info.
For the collected full-length bib, click egbib collection.
For the full name of journals and venue information of conferences, click Conference and Journal Info.
For the collected full-length bib, click egbib collection.
1 | dpkg -i xxx.deb |
dkpg is raw method to install without solving dependencies and existing software.
1 | apt-get install softname1 softname2 softname3…… |
apt-get is built on dkpg without saving the deb file. apt-get can solve dependencies and existing software. Note that when using dkpg, dkpg can circumvent apt-get, so apt-get don’t know the software installed by dkpg.
1 | aptitude install softname1 |
aptitude is also built on dkpg and more powerful than apt-get.
#!/bin/bash at the head of file indicates shell type
strict format
For if [[ $input == "hello" ]], note that the space after [[ and before ]] is very strict, since [[]] can be used for matching regular expression
arguments
When starting login or interative shells, certain files will be executed based on the following tables:
For bash:
login-y interactive-y: profile
login-y interactive-n: profile
login-n interactive-y: bashrc
For zsh:
login-y interactive-y: zshenv zprofile zshrc zlogin
login-y interactive-n: zshenv zprofile zlogin
login-n interactive-y: zshenv zshrc
login-n interactive-n: zshenv
You may fail to log in Ubuntu due to the following reasons:
/etc/environment or /etc/profile is modified to a wrong format: Just modify them back.
startX is used improperly: run sudo rm -r .Xauthority*
Tips: use Ctr+Alt+F1~6 corresponding to tty 1~6 to use command line
$sudo gedit /etc/default/locale
modify as follows,
1 | LANG="en_US.UTF-8" |
$locale-gen -en_US:en
log out or reboot
For user-wide: ~/.profile or ~/.bashrc
For system-wide: /etc/profile
source ~/.bashrc or source /etc/profile can make the newly added (not the removed) environment variables for the current cmd window available immediately. However, you need to re-login to make them user-wide or system-wide.
Note that after you sudo su (not using sudo privilege), the environment variables will be lost. You need to re-login. Because sudo su will erase newly exported variables.
For permanent system-wide change even after sudo su, you should modify /etc/environment, which is not recommended. Because /etc/environment cannot recognize intermediate variable such as $JAVA_HOME. Sometimes misusing /etc/environment may result in your failure in login.
Not recommend running sudo su and then modifying ~/.profile or ~/.bashrc.
crontab -l //list crontab
crontab -r //remove crontab
crontab -e //edit crontab
In windows, the function of contrab can be realized by using “task scheduler”.
Here is a website link to query linux commands.
create new user with home folder
1 | adduser XXX |
sudo privilege: vim /etc/sudoers and add $username ALL=(ALL) ALL at the bottom.
start ssh on the server, the default port is 22
1 | sudo apt-get install openssh-server |
list
1 | list -a #including hidden files |
view text
1 | cat |
Change the privilege
1 | chmod 777 ./ |
Check disk or file size
1 | df -h |
Compress or uncompress files, refer to this link.
Grep + regular expression
1 | grep [xyz] |
Search file
1 | locate "keyword" #fast |
Pipe commands
1 | ls -l | tr -s ' ' | cut -d ' ' -f 2 #tr to truncate space |
xargs:
1 | cat python/requirements.txt | xargs -L 1 sudo pip install |
alias: temporary alias command
1 | alias lnew="cd /home/niuli/caffe" |
export: The export command is one of the bash shell built-in commands, which means it is part of your shell.
1 | export a=linux.com |
add LD_LIBRARY_PATH
1 | echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/lib' >> ~/.bashrc |
shellscript sample
1 | #!/bin/bash |
zip/unzip
winrar x -y -ibck zip_file_name unzip_file_name //x means unzip, -y means yes to interrupted queries, -ibck means running in the background
generate the file list under one folder
dir D:\test /b >list.txt or dir D:\test /b >list.xls
combine multiple compressed volumes
copy /b logs.tar.gza* logs.tar.gz