- 1. FTP/Mobile phones
- 2. COVID-19 data
- 3. 亟待解决的问题
- 4. Installation log
- 5. Configuration
- 5.1. 中文输入法
- 5.2. fcitx-【】
- 5.3. Bibus
- 5.4. Default Applications for LXSession
- 5.5. Terminal
- 5.6. Printer installation
- 5.7. openbox –reconfigure
- 5.8. z-command
- 5.9. Keyboard shortcut in Ubuntu
- 5.10. Getting “System program problem detected” pops up regularly after upgrade
- 5.11. add-apt-repository
- 5.12. FLASH installation in Google Chrome/Chromium and Firefox
- 5.13. Upgrade
- 5.14. VirtualBox
- 5.15. E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
- 5.16. Auto login
- 5.17. Login background (lightdm)
- 5.18. Add user
- 5.19. Kernel update
- 5.20. Screensaver
- 7.1. 时间戳/timestamp
- 7.2. 转换
- 7.3. Split document/文件分割
- 7.4. How To Format USB Drive in Linux Command Line – TecAdmin
- 7.5. Installation of fonts for WPS
- 7.6. Zotero | Your personal research assistant
- 7.7. Filename sort order wrong in thunar and nemo SOLVED - Linux Mint Forums
- 7.8. Four Ways to Empty the Trash/Recycle Bin in Ubuntu
- 7.9. iOS connection
- 7.10. md5sum
- 7.11. Comparation of files
- 7.12. && and ;
- 7.13. Fonts installation
- 7.14. Loop/循环
- 7.15. Collection of xargs containing commands
- 7.16. Remove duplicated files
- 7.17. Ubuntu upgrade
- 7.18. 拼音排序
- 7.19. alias使用引号
- 7.20. Backup/sync How to Use Rsync to Sync New or Changed/Modified Files in Linux
- 7.21. Upgrade
- 7.22. 设置终端的位置和大小
- 7.23. How to uninstall LibreOffice?
- 7.24. Font of Terminal
- 7.25. Screensaver in Lubuntu
- 7.26. 替换Windows的回车
- 7.27. linux shell下除了某个文件外的其他文件全部删除的命令
- 7.28. Shell中使用变量/Variable
- 7.29. Shell数组长度
- 7.30. Wechat
- 7.31. Screen
- 7.32. Hosts
- 7.33. Sublime列模式
- 7.34. Installation of Sublime Text 3
- 7.35. LiveUSB
- 7.36. Change to BASH
- 7.37. Download from PCS(BCloud)
- 7.38. Display graphic card
- 7.39. Difference between two directories in Linux
- 7.40. Mounting a drive
- 7.41. Labelling partition
- 7.42. terminal - Renaming a Hard Drive - Unix & Linux Stack Exchange
- 7.43. apt-get update errors - 50unattended-upgrades.ucf-dist
- 7.44. 恢复删除文件
- 7.45. Backup
- 7.46. Restore
- 7.47. EXFAT support
- 7.48. Hard drive space as memory
- 7.49. PDF manipulation
- 7.50. Preference missing
- 7.51. 微软雅黑字体安装脚本
- 7.52. Ubuntu 14.04 遇到incompatible with the Avahi network service discovery 解决
- 7.53. apt-fast
- 7.54. Upgrade from ISO
- 7.55. Configuration of LXDE (Lubuntu)
- 7.56. Hibernate
- 7.57. wget下载整个目录(迭代)
- 9.1. .tar
- 9.2. .gz
- 9.3. .tar.gz 和 .tgz
- 9.4. .bz2
- 9.5. .tar.bz2
- 9.6. .bz
- 9.7. .tar.bz
- 9.8. .Z
- 9.9. .zip
- 9.10. .rar
- 9.11. .lha
- 9.12. .rpm
- 9.13. .deb
- 9.14. .tar .tgz .tar.gz .tar.Z .tar.bz .tar.bz2 .zip .cpio .rpm .deb .slp .arj .rar .ace .lha .lzh .lzx .lzs .arc .sda .sfx .lnx .zoo .cab .kar .cpt .pit .sit .sea
- 9.15. gzip 命令
- 9.16. tar、gzip、unzip命令的详细使用方法备忘
- 11.1. AnyDesk
- 11.2. Hackage: The Haskell Package Repository
- 11.3. Shashlik/Android emulator
- 11.4. xml2x 0.4.2 on Hackage - Libraries.io
- 11.5. Ubuntu Downloads & Install Instructions for uGet
- 11.6. How to install Calligra 3.0.1 Office Suite on Ubuntu
- 11.7. How to Install OnlyOffice on Ubuntu 16.04 LTS - LinuxBabe
- 11.8. Yandex
- 11.9. VYM - View Your Mind
- 11.10. YouTube-DL
- 11.11. synapse
- 11.12. WeChat【微信】
- 11.13. XMind
- 11.14. Freemind
- 11.15. SeaMonkey
- 11.16. Calibre [^Calibre]
- 11.17. vokoscreen
- 11.18. SimpleScreenRecorder
- 11.19. Shutter
- 11.20. TeamViewer
- 11.21. Installation of Google Drive
- 11.22. Dock
- 11.23. Cairo-Dock
- 11.24. Grive
- 11.25. Chromium
- 11.26. Google Chrome
- 11.27. QQ with Pidgin (lwqq)
- 11.28. fcitx
- 11.29. Downloaders
FTP/Mobile phones
DCIM/Camera Directory
1 | Site=ftp://ht@192.168.1.${i}:2121/DCIM; nemo -n ${Site} # DCIM/Camera Directory |
Download Directory
1 | Site=ftp://ht@192.168.1.${i}:2121/Download; nemo -n ${Site} # Download directory |
百度网盘
1 | Site=ftp://ht@192.168.1.${i}:2121/BaiduNetdisk; nemo -n ${Site} # 百度网盘 |
微信
1 | Site=ftp://ht@192.168.1.${i}:2121/Android/data/com.tencent.mm/MicroMsg/Download; nemo -n ${Site} # WeChat/Weixin |
1 | Site=ftp://ht@192.168.1.${i}:2121/Android/data/com.tencent.mobileqq/Tencent/QQfile_recv; nemo -n ${Site} ## Mobile QQ |
COVID-19
1 | Site=ftp://ht@192.168.1.${i}:2121/Documents/Study/COVID-19; nemo -n ${Site} # COVID-19 |
Study Directory
1 | Site=ftp://ht@192.168.1.${i}:2121/Documents/Study/; nemo -n ${Site} # Study |
Markor Directory
1 | Site=ftp://ht@192.168.1.${i}:2121/Documents/markor/; nemo -n ${Site} # Markor |
VOA
1 | Site=ftp://ht@192.168.1.${i}:2121/Android/data/vn.innoloop.VOALearningEnglish/cache/audio-cache ## VOA |
COVID-19 data
1 | mkdir `Date`;cd `Date`; nemo -n; \ |
1 | for i in 'https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_deaths_global.csv https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_recovered_global.csv https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_US.csv https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_deaths_US.csv'; do wget ${i}; done |
以上文本不来自My_Linux.html。
亟待解决的问题
- Remote control
- openSSH
- Remote control between Windows and Linux
- NGS pipeline
Installation log
SoftEtherVPN
1 | sudo add-apt-repository ppa:paskal-07/softethervpn |
1 | Signing key: |
WINE
1 | sudo apt install wine64 |
zotero
- Extract bz2 pack
- Move directory to /opt/
- run “set_launcher_icon”
- run “ln -s /opt/zotero/zotero.desktop ~/.local/share/applications/zotero.desktop”
djvu viewer
1 | sudo apt install djview |
VLC
1 | sudo snap install vlc |
1 | sudo apt install snapd |
1 | sudo add-apt-repository ppa:videolan/stable-daily |
FileZilla
- How to Install FileZilla Client 3.20 in Ubuntu 16.04 | UbuntuHandbook
- How to Install FileZilla Client 3.25.0 in Ubuntu 16.10 via PPA
- How to Install FileZilla Client 3.25.0 in Ubuntu 16.10 via PPA
- Download FileZilla Client
1 | sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu xenial-getdeb apps" >> /etc/apt/sources.list.d/getdeb.list' |
HandBrake
1 | sudo apt-get install handbrake |
CopyQ/Clipboard manager
Keyword, clipboard, multiple
1 | sudo add-apt-repository ppa:noobslab/indicators |
ncbi-genome-download
1 | conda install -c bioconda ncbi-genome-download |
hugin
- Install Panorama Stitcher Hugin 2018 in Ubuntu 16.04, 17.10 | UbuntuHandbook
- Hugin - Panorama photo stitcher
- Panorama Tools
- Hugin Compiling Ubuntu - PanoTools.org Wiki
1 | sudo add-apt-repository ppa:ubuntuhandbook1/apps |
silversearcher-ag
- the silver searcher:快如闪电的 grep | Ming’s Blog
- Ag (the_silver_searcher) 安装使用 - Leslie Guan - 博客园
- GitHub - ggreer/the_silver_searcher: A code-searching tool similar to ack, but faster.
1 | sudo apt-get install silversearcher-ag |
amule installation
1 | sudo apt install amule |
Planner from Apps/Planner/Downloads - GNOME Wiki!, Vision, Bio-Linux
Configuration
中文输入法
- 安装搜狗拼音输入法Linux · Issue #3 · cheng470/note · GitHub
- art fcitx中文设置输入英文符号 - 严谨死板君的专栏 - CSDN博客
- Ubuntu中英文切换及编辑特殊符号 - iamplane的博客 - CSDN博客
- 【高级】选项卡 - 搜狗输入法
- Deepin如何设置中文输入法用英文标点符号? - 知乎
fcitx-【】
1 | subl /usr/share/fcitx/data/punc.mb.zh_CN |
Bibus
Pubmed
- Go to Edit -> Preferences, check Advanced preferences, select tab PubMed
- Change “http” to “https”
- Press OK
Default Applications for LXSession
Installation from lubuntu-software-center
Terminal
lxsession-default-terminal %s # for Ubuntu (GNOME Terminal)
lxterminal %s # for Lubuntu
x-terminal-emulator %s
Printer installation
1 | cd /media/ht/ht_5T/Stored_Softs/Linux_Softs/HPLIP |
openbox –reconfigure
修改~/.config/openbox/lubuntu...后执行openbox --reconfigure可以避免reboot
z-command
zcommands: Read gzip Compressed Text Files On a Fly - nixCraft
1 | zless data.txt.gz |
grep in compressed gz file
1 | zgrep "something" gz_file |
sed in compressed gz file
1 | gunzip -c 20110203.1104.gz | sed -n '1p;$p' |
Keyboard shortcut in Ubuntu
KeyboardShortcuts - Community Help Wiki
Getting “System program problem detected” pops up regularly after upgrade
1 | gksudo gedit /etc/default/apport |
add-apt-repository
1 | sudo add-apt-repository ppa:bill-zt/gtkqq |
Ign meaning in apt-get update
What does ‘Ign’ mean when running an apt-get update? - Ask Ubuntu
Hitmeans apt checked the timestamps on package list, those match and there are no changes.Ignmeans there are no changes in the pdiff index file, it wont bother downloading it again.
FLASH installation in Google Chrome/Chromium and Firefox
Chrome
- Open the program Software and Updates
- Go to Other Software
- Enable (check) Canonical Partners and close Software and Updates
- Open up a terminal and run: sudo apt-get update
- Now install flash: sudo apt-get install adobe-flashplugin
为Chromium安装Flash player
下载https://get.adobe.com/cn/flashplayer上的Tar包
1.解压下载的tar包解压到需要的位置
1 | tar xzvf flash_player_ppapi_linux.x86_64.tar.gz -C flash_chrome |
2.把libpepflashplayer.so复制到chromium的插件目录:
1 | sudo cp libpepflashplayer.so /usr/lib/chromium-browser/plugins/libpepflashplayer.so |
3.修改chromium的配置文件:
修改/etc/chromium-browser/default,修改CHROMIUM_FLAGS,修改后大致如下:
# Options to pass to chromium-browser
CHROMIUM_FLAGS="--ppapi-flash-path=/usr/lib/chromium-browser/plugins/libpepflashplayer.so --ppapi-flash-version=22.0.0.209"
这里有一点需要注意:其中ppapi-flash-version=22.0.0.209中的版本号,要与tar包中manifest.json中的版本号对应起来.
4.重启Chromium即可生效
为Firefox安装Flash player
Fast way
Flash plugin for Firefox on Ubuntu 16.04 - Ask Ubuntu
1 | sudo apt-get install browser-plugin-freshplayer-pepperflash |
- 解压下载的tar包解压到需要的位置
1 | tar xzvf flash_player_ppapi_linux.x86_64.tar.gz -C flash_chrome |
- libflashplayer.so复制到firefox的插件目录:
1 | sudo cp libflashplayer.so /usr/lib/mozilla/plugins/libflashplayer.so |
- 复制flash的配置文件:
1 | sudo cp -r usr/* /usr |
- 重启firefox即可。
结语:就这么多,挺简单吧.
Upgrade
- upgrade - Upgrading from the command line? - Ask Ubuntu
- 如何从以前的版本升级到Ubuntu 17.10_Linux教程_Linux公社-Linux系统门户网站
1 | sudo apt-get install update-manager-core |
You may need to check /etc/update-manager/release-upgrades and change the line:
Prompt=lts
to:
Prompt=normal
VirtualBox
Restore the mini-menu bar
- Right Ctrl + C
Folder sharing
- Insert Guest Additions CD Image
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
1 | sudo rm /var/lib/apt/lists/lock |
Auto login
How to enable Lubuntu auto login?
Since, Precise Pangolin, lightdm is used as the display manager. Therefore you will have to edit /etc/lightdm/lightdm.conf:
sudo nano /etc/lightdm/lightdm.conf
Edit the file to look like this:
[SeatDefaults]
autologin-user=USERNAME
autologin-user-timeout=0
user-session=Lubuntu
greeter-session=lightdm-gtk-greeter
Replace, USERNAME with the username you want to login as. Save and exit. Upon next reboot your Lubuntu system should automatically log the user in. This procedure works on 12.10 Quantal Quetzal as well. The official how-to can be found here.
1 | sudo dpkg-reconfigure gdm3 |
Login background (lightdm)
1 | gksu gedit /etc/lightdm/unity-greeter.conf |
- How To Change LightDM (Login Screen) Background [Quick Tip] ~ Web Upd8: Ubuntu / Linux blog
- [lubuntu] Change Login Screen
Add user
1 | # adduser tom |
Kernel update
The simplest set of instructions I always used for kernel upgrade / downgrade are by ubuntuforums.org user by the name of lykwydchykyn (url modified by me for this post):
- Go here: http://kernel.ubuntu.com/~kernel-ppa/mainline/
- Download 3 (maybe 4) debs to a folder somewhere:
- linux-headers-VERSION-NUMBER_all.deb
- linux-headers-VERSION-NUMBER_amd64.deb
- linux-image-VERSION-NUMBER_amd64.deb
- linux-image-extra-VERSION-NUMBER_amd64.deb # if available
- Install the debs with whatever package manager front-end you use (is gdebi still around?), or use these commands:
1 | cd /path/to/folder/where/you/put/the/debs |
Sources:
- https://wiki.ubuntu.com/Kernel/MainlineBuilds
- http://ubuntuforums.org/showthread.php?p=11391743#post11391743
Screensaver
sudo apt-get remove gnome-screensaver
sudo apt-get install xscreensaver xscreensaver-data-extra xscreensaver-gl-extra
Widgets/Applet
Calender
1 | sudo apt install gcalcli conky-all |
1 | sudo add-apt-repository ppa:screenlets/ppa |
Conky
1 | sudo apt-get install conky-all |
PlexyDesk
1 | sudo add-apt-repository ppa:plexydesk/plexydesk |
Alarm/Timer
- software recommendation - A countdown timer that minimises to tray? - Ask Ubuntu
- [ubuntu] desktop countdown timer
- 10 Time Tracking Software for Ubuntu - TimeCamp
- Where do I find a days countdown timer for Ubuntu? - Quora
- Download software about Desktop - Ubuntu
- CountDown 0.2 for Ubuntu - Download
/media/ht/ht_5T/Stored_Softs/Linux_Softs/Widgets
- countdown-0.2.gz
- timer-applet-2.1.2.deb
countdown
1 | export RELEASE="1.0.0" |
sleep
1 | nohup sleep 60 && notify-send Timer "Time up" && paplay /usr/share/sounds/freedesktop/stereo/complete.oga & |
alarm-clock-applet
1 | sudo apt install alarm-clock-applet # the minimal unit is minute |
Linux - Fake File Access, Modify and Change TimeStamps - ShellHacks
Change a file’s
atime(access time):$ touch -a –date=”1988-02-15” file.txt
$ touch -a –date=”1988-02-15 01:00” file.txt
$ touch -a –date=”1988-02-15 01:00:17.547775198 +0300” file.txtChange a file’s
mtime(modification time):$ touch -m –date=”2020-01-20” file.txt
$ touch -m –date=”2020-01-20 23:05” file.txt
$ touch -m –date=”2020-01-20 23:05:43.443117094 +0400” file.txt
Tips
时间戳/timestamp
- Linux 怎么修改系统和文件的创建时间和最后修改时间_百度知道
- Linux命令(五)创建文件或修改文件时间 touch - ay-a - 博客园
- Linux如何查看文件的创建、修改时间? - 帅哥不吃香菜 - 博客园
- windows用powershell修改文档/文件夹创建时间、修改时间_运维_Adrianna的专栏-CSDN博客
- DEBUGFS Command - Show File Creation Times in Linux
- Linux - Fake File Access, Modify and Change TimeStamps - ShellHacks
- timestamp - How can I change the date modified/created of a file? - Ask Ubuntu
转换
整理自转换.odt
1 | /media/ht/ht_5T/Work/References/Computer_Tips/Linux_Tips/My_Linux/My_Linux.Rmd |
opencc
1 | sudo apt-get install opencc |
epstopdf
1 | for file in `ls *.ps`; do epstopdf $file; done |
Split document/文件分割
以下命令将”2.txt”文件分割并转为以”part”开始的文件,分割符(delimiter)为”>Cluster”。
1 | csplit -s -f part 2.txt '/^>Cluster/' {*} |
AWK具有分割字符串的功能,具体见下面的链接。
- split file by delimiter with csplit
- How to Divide Files with split | Linode
- Linux split command help and examples
- 11 Useful split command examples for Linux/UNIX systems
- 【转】linux下awk内置函数的使用(split/substr/length) - myLittleGarden - 博客园,非常清楚的介绍
How To Format USB Drive in Linux Command Line – TecAdmin
1 | df-h |
> What’s FAT?
FAT may sound like a strange name for a file system, but it’s actually an acronym for File Allocation Table. Introduced in 1981, FAT is ancient in computer terms. Because of its age, most operating systems, including Microsoft Windows NT®, Windows 98, the Macintosh OS, and some versions of UNIX, offer support for FAT.
The FAT file system limits filenames to the 8.3 naming convention, meaning that a filename can have no more than eight characters before the period and no more than three after. Filenames in a FAT file system must also begin with a letter or number, and they can’t contain spaces. Filenames aren’t case sensitive.
> What About VFAT?
Perhaps you’ve also heard of a file system called VFAT. VFAT is an extension of the FAT file system and was introduced with Windows 95. VFAT maintains backward compatibility with FAT but relaxes the rules. For example, VFAT filenames can contain up to 255 characters, spaces, and multiple periods. Although VFAT preserves the case of filenames, it’s not considered case sensitive.
When you create a long filename (longer than 8.3) with VFAT, the file system actually creates two different filenames. One is the actual long filename. This name is visible to Windows 95, Windows 98, and Windows NT (4.0 and later). The second filename is called an MS-DOS® alias. An MS-DOS alias is an abbreviated form of the long filename. The file system creates the MS-DOS alias by taking the first six characters of the long filename (not counting spaces), followed by the tilde [
] and a numeric trailer. For example, the filename Brien’s Document.txt would have an alias of BRIEN’1.txt.
An interesting side effect results from the way VFAT stores its long filenames. When you create a long filename with VFAT, it uses one directory entry for the MS-DOS alias and another entry for every 13 characters of the long filename. In theory, a single long filename could occupy up to 21 directory entries. The root directory has a limit of 512 files, but if you were to use the maximum length long filenames in the root directory, you could cut this limit to a mere 24 files. Therefore, you should use long filenames very sparingly in the root directory. Other directories aren’t affected by this limit.
You may be wondering why we’re discussing VFAT. The reason is it’s becoming more common than FAT, but aside from the differences I mentioned above, VFAT has the same limitations. When you tell Windows NT to format a partition as FAT, it actually formats the partition as VFAT. The only time you’ll have a true FAT partition under Windows NT 4.0 is when you use another operating system, such as MS-DOS, to format the partition.
> FAT32
FAT32 is actually an extension of FAT and VFAT, first introduced with Windows 95 OEM Service Release 2 (OSR2). FAT32 greatly enhances the VFAT file system but it does have its drawbacks.
The greatest advantage to FAT32 is that it dramatically increases the amount of free hard disk space. To illustrate this point, consider that a FAT partition (also known as a FAT16 partition) allows only a certain number of clusters per partition. Therefore, as your partition size increases, the cluster size must also increase. For example, a 512-MB FAT partition has a cluster size of 8K, while a 2-GB partition has a cluster size of 32K.
This may not sound like a big deal until you consider that the FAT file system only works in single cluster increments. For example, on a 2-GB partition, a 1-byte file will occupy the entire cluster, thereby consuming 32K, or roughly 32,000 times the amount of space that the file should consume. This rule applies to every file on your hard disk, so you can see how much space can be wasted.
Converting a partition to FAT32 reduces the cluster size (and overcomes the 2-GB partition size limit). For partitions 8 GB and smaller, the cluster size is reduced to a mere 4K. As you can imagine, it’s not uncommon to gain back hundreds of megabytes by converting a partition to FAT32, especially if the partition contains a lot of small files.
> Note: This section of the quote/ article (1999) is out of date. Updated info quote below.
> As I mentioned, FAT32 does have limitations. Unfortunately, it isn’t compatible with any operating system other than Windows 98 and the OSR2 version of Windows 95. However, Windows 2000 will be able to read FAT32 partitions.
> The other disadvantage is that your disk utilities and antivirus software must be FAT32-aware. Otherwise, they could interpret the new file structure as an error and try to correct it, thus destroying data in the process.
Finally, I should mention that converting to FAT32 is a one-way process. Once you’ve converted to FAT32, you can’t convert the partition back to FAT16. Therefore, before converting to FAT32, you need to consider whether the computer will ever be used in a dual-boot environment. I should also point out that although other operating systems such as Windows NT can’t directly read a FAT32 partition, they can read it across the network. Therefore, it’s no problem to share information stored on a FAT32 partition with other computers on a network that run older operating systems.
Installation of fonts for WPS
根据linux版wps-office安装缺少的字体 - 程序园执行以下,安装字体。
1 | sudo dpkg -i /media/ht/ht_5T/Stored_Softs/Cross_Platform_Softs/WPS/Installer/wps-office-fonts_1.0_all.deb |
下载的系统字体根据Ubuntu下WPS中文字体显示问题 - Webbley - CSDN博客来自pan.baidu.com/s/1o8ujqhc?errno=0&errmsg=Auth%20Login%20Sucess&&bduss=&ssnerror=0&traceid=,文件如下
1 | /media/ht/ht_5T/Stored_Softs/Cross_Platform_Softs/WPS/Installer/wps_symbol_fonts.zip |
以下代码应该是构建字库的核心代码,与TeX的字库构建类似。
1 | # Download /media/ht/ht_5T/Stored_Softs/Cross_Platform_Softs/WPS/Installer/wps_symbol_fonts.zip |
以下代码安装常用字体
1 | sudo apt-get install ttf-wqy-microhei #文泉驿-微米黑 |
Zotero | Your personal research assistant
Filename sort order wrong in thunar and nemo SOLVED - Linux Mint Forums
1 | LANG=C |
Four Ways to Empty the Trash/Recycle Bin in Ubuntu
1 | cd .local/share/Trash/ |
iOS connection
- iphone - How do I access iOS camera pictures on Ubuntu? - Ask Ubuntu
- 16.04 - How to sync iphone - Ask Ubuntu
- How to Sync Your iPhone or iPod Touch in Ubuntu
md5sum
Rapid code
1 | md5sum -c *.md5 # in the current directory, pairs of XXX and XXX.md5 as well |
Description
- howto use md5sum - Google Search
- Validating the MD5 Checksum of a File
- md5sum files | –check file - Linux Pocket Guide [Book]
- Linux md5sum Command Explained For Beginners (5 Examples)
1 | md5sum file1.txt file2.txt file3.txt > hashes # output md5 values to a doc |
Comparation of files
1 | for i in *.tar.gz; do tar zxvf $i; |
&& and ;
1 | false && echo"hello" |
1 | command1 && command2 |
Fonts installation
Copy the fonts to /usr/local/share/fonts or a subfolder (such as /usr/local/share/fonts/TTF) and then run sudo fc-cache -fv. There are some graphical programs you can install to make this easier, but I’ve never felt the need to try any of them. The Ubuntu wiki page on Fonts here may be of help too.
Loop/循环
1 | for ((c=1; c<=$j; c++)); do echo $c;done |
Collection of xargs containing commands
1 | echo /etc/dhcpcd.conf ../foo/bar/filename.tar.gz | xargs -n 1 basename | cut -d '.' -f1 |
Remove duplicated files
- How to Find Duplicate Files in Linux and Remove Them
- bash - How to remove duplicated files in a directory? - Super User
- fdupes - Wikipedia
dupeGuru
1 | sudo add-apt-repository ppa:hsoft/ppa |
FSlint: GUI tool to find and remove duplicate files
1 | sudo apt install fslint |
FDUPES: CLI tool to find and remove duplicate files
1 | sudo apt install fdupes |
fdupes is the tool of your choice. To find all duplicate files (by content, not by name) in the current directory:
fdupes -r .
To manually confirm deletion of duplicated files:
fdupes -r -d .
To automatically delete all copies but the first of each duplicated file (be warned, this warning, this actually deletes files, as requested):
fdupes -r -f . | grep -v '^$' | xargs rm -v
I’d recommend to manually check files before deletion:
fdupes -rf . | grep -v '^$' > files
... # check files
xargs -a files rm -v
bash - How to remove duplicated files in a directory? - Super User
- bash 4.x
1 | #!/bin/bash |
This is both recursive and handles any file name. Downside is that it requires version 4.x for the ability to use associative arrays and recursive searching. Remove the echo if you like the results.
- gawk version
1 | gawk ' |
Note that this will still break on files that have double-quotes in their name. No real way to get around that with awk. Remove the echo if you like the results.
- diff version
How to test files having unique content?
if diff "$file1" "$file2" > /dev/null; then
...
How can we get list of files in directory?
files="$( find ${files_dir} -type f )"
We can get any 2 files from that list and check if their names are different and content are same.
1 | #!/bin/bash |
For example, we have some dir:
$> ls .tmp -1
all(2).txt
all.txt
file
text
text(2)
So there are only 3 unique files.
Lets run that script:
$> ./removeDuplicates.sh .tmp/
.tmp/text(2) and .tmp/text are duplicates
removed `.tmp/text'
.tmp/all.txt and .tmp/all(2).txt are duplicates
removed `.tmp/all(2).txt'
And we get only 3 files leaved.
$> ls .tmp/ -1
all.txt
file
text(2)
- Script
1 | mfilter.sh ./dir | bash |
duplicate.sh
1 | #!/bin/bash |
MacOS X version
1 | #!/bin/bash |
Ubuntu upgrade
- How to upgrade from Ubuntu 17.10 to 18.04 using an ISO file - Quora
- 11.04 - How to upgrade Ubuntu from an ISO image - Ask Ubuntu
1 | sudo mkdir -p /media/cdrom |
拼音排序
1 | 编辑 /etc/environment 文件,添加或者修改: |
alias使用引号
使用\或在/usr/bin中设置命令
Backup/sync How to Use Rsync to Sync New or Changed/Modified Files in Linux
rsync options source destination
1 | Source=/home/ht/Downloads/NFE2/ # 一定确保最后一个字符是`/` |
Upgrade
1 | software-properties-gtk # Software & Updates |
apt upgrade problem in Mini
1 | sudo mv /var/lib/dpkg/info/ /var/lib/dpkg/info_old/ |
设置终端的位置和大小
Can a Terminal window be resized with a Terminal command? - Ask Different
resize -s 30 80
printf ‘\e[8;50;100t’
How to uninstall LibreOffice?
sudo apt-get remove --purge libreoffice*
sudo apt-get clean
sudo apt-get autoremove
Font of Terminal
`Lucida Console`
Screensaver in Lubuntu
configuration - Configure screensaver in Ubuntu - Ask Ubuntu
Installing XScreenSaver
Open a terminal and run the following command to uninstall gnome-screensaver:
sudo apt-get remove gnome-screensaver
Install XScreenSaver and some additional screensaver packages with the following command:
sudo apt-get install xscreensaver xscreensaver-data-extra xscreensaver-gl-extra
Configuring your screensaver
After installation, perform a search in the Dash for Screensaver. Launch the Screensaver utility and use it to configure XScreenSaver and select your screensaver settings.
The Screensaver utility will prompt you to stop the gnome-screensaver process and launch the xscreensaver background process when you start it.
By default, XScreenSaver will choose a random screensaver each time it starts. You can specify the screensavers it chooses from or enable “Only One Screensaver” mode to always use your favorite screensaver.
Adding to Startup
To actually use the screensavers, you’ll want XScreenSaver to start in the background each time you log in. If it doesn’t start, it can’t notice your system is idle and launch screensavers.
Get started by launching the Startup Applications utility from the Dash. Add a startup program with the following command. The name and comment here can be anything you like:
xscreensaver -nosplash
Reverting Your Changes
Reverting these changes is simple. Just run these commands to uninstall XScreenSaver and reinstall gnome-screensaver:
sudo apt-get remove xscreensaver xscreensaver-data-extra xscreensaver-gl-extra
sudo apt-get install gnome-screensaver
Source and more about: How to Add Screensavers to Ubuntu 12.04.
替换Windows的回车
Linux下转换Windows换行符-skykiker-ChinaUnix博客
1 | sed -i 's/\r//' ${Input} # 替换Windows的回车 |
linux shell下除了某个文件外的其他文件全部删除的命令
最简单的方法是
1 | shopt -s extglob (打开extglob模式) |
如果是多个要排除的,可以这样:
1 | rm -rf !(file1|file2) |
Shell中使用变量/Variable
awk内使用"'${}'"的格式,使用变量。双引号在外面,单引号在里面。
1 | cat 1.csv | awk '$2 == "'${CDS}'" { print $0 }' |
Shell数组长度
1 | Shell数组元素个数${#array[@]} 数组的所有元素${array[*]} 字符串长度${#str} |
- 获取数组元素的个数:
1 | array=(bill chen bai hu); |
遍历数组就变成非常简单的事情:
1 | for ((i=0;i<num;i++)) |
获取数组某一个单元的长度就变成了:
1 | ${#array[i]} |
- 获取数组的所有元素:
1 | ${array[*]} |
遍历数组就编程了非常简单的事情:
1 | for var in ${array[*]} |
获取数组某一个单元的长度就变成了:
1 | ${#var} |
- 获取字符串的长度:
1 | str="hello" |
- 简单方式
1 | for i in a b c; do echo $i; done |
Screen
- screen
- tmux
- byobu
Byobu:打造多任务的Terminal - 系统应用 - LUPA开源社区
autostart项目中添加byobu-enable。本项加入后,由目录浏览器进入终端将无法直接进入所在目录。
热键说明
- F2 创建新的窗口
- F3 回到先前窗口
- F4:跳到下一个窗口
- F5 重新加载文件
- F6 释放该次对话
- F7 进入 复制/回滚模式
- F8 重新命名一个窗口
- F9 配置菜单,也可以使用组合键Ctrl+a, Ctrl+@
更多信息可以查询man byubu
Hosts
Sublime列模式
苹果:OS X
- 鼠标左键+Option
- 或者鼠标中键
- 增加选择:Command,减少选择:Command+Shift
Windows:
- 鼠标右键+Shift
- 或者鼠标中键
- 增加选择:Ctrl,减少选择:Alt
Linux:
- 鼠标右键+Shift
- 增加选择:Ctrl,减少选择:Alt
Installation of Sublime Text 3
Linux Package Manager Repositories – Sublime Text 3 Documentation
Install the GPG key:
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
Ensure apt is set up to work with https sources:
sudo apt-get install apt-transport-https
Select the channel to use:
- Stable
echo “deb https://download.sublimetext.com/ apt/stable/“ | sudo tee /etc/apt/sources.list.d/sublime-text.list
- Dev
echo “deb https://download.sublimetext.com/ apt/dev/“ | sudo tee /etc/apt/sources.list.d/sublime-text.list
Update apt sources and install Sublime Text
sudo apt-get update
sudo apt-get install sublime-text
sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text-installer
LiveUSB
- Creating Images Of Your Linux System With SystemImager
- installation - Create a customized Ubuntu Live USB - Ask Ubuntu
- How to use Cubic to create a custom Ubuntu live CD image? - Ask Ubuntu
Change to BASH
1 | chsh -s /bin/bash |
Download from PCS(BCloud)
pcs download /Stored_Softs/Hosts/20170709/Android安卓跟Linux系列/hosts ./hosts
Display graphic card
Linux Find Out Graphics Card Installed In My System – nixCraft
How to get information about graphics card (GPU) on Linux
lspci -vnn | grep VGA -A 12
sudo lshw -C display
Difference between two directories in Linux
bash - Difference between two directories in Linux - Stack Overflow
diff -r dir1 dir2 | grep dir1 | awk '{print $4}' > difference1.txt
Explanation:
- diff -r dir1 dir2 shows which files are only in dir1 and those only in dir2 and also the changes of the files present in both directories if any.
- diff -r dir1 dir2 | grep dir1 shows which files are only in dir1
- awk to print only filename.
Mounting a drive
1 | sudo fdisk -l |
Labelling partition
1 | ######################################## |
terminal - Renaming a Hard Drive - Unix & Linux Stack Exchange
Method 1# using dosfslabel ( As @Macro suggested )
Umount Partition
sudo umount <device>
Set Label using :
sudo dosfslabel <device> label
Method 2# using mtools
Install package using
sudo apt-get install mtools
unmount the external drive, Partitions generally need to be unmounted before you can fiddle with them, so unmount the partition of the device you want to change the label for:
sudo umount <device>
where device name can be /dev/sdbx, you can find in sudo fdisk -lCheck the current label
sudo mlabel -i <device> -s ::
Note that we’re using the special “::” drive which allows us to specify the device descriptor on the command line; otherwise we’d have to edit ~/.mtoolsrc to assign a drive letter.
Change the label
sudo mlabel -i <device> ::<label>
apt-get update errors - 50unattended-upgrades.ucf-dist
sudo rm /etc/apt/apt.conf.d/50unattended-upgrades.ucf-dist
恢复删除文件
1 | sudo apt-get install testdisk |
Backup
1 | cd / |
Restore
1 | sudo su |
EXFAT support
partitioning - How to enable exFAT in Ubuntu 14.04 - Ask Ubuntu
1 | sudo apt-get install exfat-fuse exfat-utils |
Hard drive space as memory
How To Use Hard Disk As RAM In Ubuntu Linux - Subin’s Blog
How To Use Hard Disk As RAM In Ubuntu Linux
Operating System » Windows » How To Use Hard Disk As RAM In Ubuntu Linux
Hard Disk, Memory, RAM, Terminal, Tip, Trick
Published September 22, 2013
I heard that it is possible to use a portion of hard disk as RAM in Windows. I wondered if this trick is available for Ubuntu, so I googled about it and couldn’t find anything related to it. But I found out an AskUbuntu answer of using USB sticks as RAM. I did the same trick on Hard Disk and it works !!
This trick can be accomplished with the use of some small commands in Terminal. The RAM memory increase can’t be noted in the System**Monitor** application.So, Let’s begin.
Create a file of 512**MB** (The 512 indicates the RAM memory to be added): dd if=/dev/zero of=~/subinsblog bs=4096 count=131072
The yellow background text above shows the count of the file we are going to create. This count and bs determines the file size. This is how I got the count :
512 * 1024^2 / 4096 = 131072
The yellow background text above shows the file size we need to create in Mega Bytes (MB). If you need to create SWAP space with more than 512 MB change the yellow background text above to the MB you want and get the result of the calculation. The result is the count.
Example of 1 GB :
1024 * 1024^2 / 4096 = 262144
and the command will become :
dd if=/dev/zero of=~/subinsblog bs=4096 count=262144
The command will create a file named subinsblog on your home directory.
Now let’s create the SWAP space on the file and enable the SWAP:
sudo mkswap ~/subinsblog -f && sudo swapon -p 1000 ~/subinsblog
You’re RAM**Memory** is now increased. To check whether if it is increased, do the following command :
free -m
You will get a result like below :
PDF manipulation
See
PDFtk
Preference missing
1 | alacarte |
微软雅黑字体安装脚本
终端选用Ubuntu Mono Regular。
1 | wget -O get-fonts.sh.zip http://files.cnblogs.com/DengYangjun/get-fonts.sh.zip |
Ubuntu 14.04 遇到incompatible with the Avahi network service discovery 解决
1 | sudo -i |
apt-fast
1 | # Ubuntu 14.04 and later versions |
Upgrade from ISO
» 利用 ISO 镜像来离线升级 Ubuntu Wow! Ubuntu
1 | sudo mount -t iso9660 -o loop ~/maverick-alternate-i386.iso /cdrom |
Configuration of LXDE (Lubuntu)
Hibernate
sudo pm-hibernate
Win-H
wget下载整个目录(迭代)
1 | Site="http://www.ormbunkar.se/aliview/downloads/" |
Office Suite
可能这部分归入Media Management比较合理。
压缩和解压缩命令汇总(Compress)
Linux下解压命令大全
gz文件浏览
less and cat
less 1.fastq.gz
.tar
解包:tar xvf FileName.tar
打包:tar cvf FileName.tar DirName
(注:tar是打包,不是压缩!)
.gz
解压1:gunzip FileName.gz
解压2:gzip -d FileName.gz
压缩:gzip FileName
.tar.gz 和 .tgz
解压:tar zxvf FileName.tar.gz
压缩:tar zcvf FileName.tar.gz DirName
.bz2
解压1:bzip2 -d FileName.bz2
解压2:bunzip2 FileName.bz2
压缩: bzip2 -z FileName
.tar.bz2
解压:tar jxvf FileName.tar.bz2
压缩:tar jcvf FileName.tar.bz2 DirName
.bz
解压1:bzip2 -d FileName.bz
解压2:bunzip2 FileName.bz
压缩:未知
.tar.bz
解压:tar jxvf FileName.tar.bz
压缩:未知
.Z
解压:uncompress FileName.Z
压缩:compress FileName
.tar.Z
解压:tar Zxvf FileName.tar.Z
压缩:tar Zcvf FileName.tar.Z DirName
.zip
解压:unzip FileName.zip
压缩:zip FileName.zip DirName
.rar
解压:rar x FileName.rar
压缩:rar a FileName.rar DirName
.lha
解压:lha -e FileName.lha
压缩:lha -a FileName.lha FileName
.rpm
解包:rpm2cpio FileName.rpm | cpio -div
.deb
解包:ar p FileName.deb data.tar.gz | tar zxf -
.tar .tgz .tar.gz .tar.Z .tar.bz .tar.bz2 .zip .cpio .rpm .deb .slp .arj .rar .ace .lha .lzh .lzx .lzs .arc .sda .sfx .lnx .zoo .cab .kar .cpt .pit .sit .sea
解压:sEx x FileName.*
压缩:sEx a FileName.* FileName
sEx只是调用相关程序,本身并无压缩、解压功能,请注意!
gzip 命令
减少文件大小有两个明显的好处,一是可以减少存储空间,二是通过网络传输文件时,可以减少传输的时间。gzip 是在 Linux 系统中经常使用的一个对文件进行压缩和解压缩的命令,既方便又好用。
语法:gzip [选项] 压缩(解压缩)的文件名该命令的各选项含义如下:
-c 将输出写到标准输出上,并保留原有文件。-d 将压缩文件解压。-l 对每个压缩文件,显示下列字段: 压缩文件的大小;未压缩文件的大小;压缩比;未压缩文件的名字-r 递归式地查找指定目录并压缩其中的所有文件或者是解压缩。-t 测试,检查压缩文件是否完整。-v 对每一个压缩和解压的文件,显示文件名和压缩比。-num 用指定的数字 num 调整压缩的速度,-1 或 –fast 表示最快压缩方法(低压缩比),-9 或–best表示最慢压缩方法(高压缩比)。系统缺省值为 6。指令实例:
gzip *% 把当前目录下的每个文件压缩成 .gz 文件。gzip -dv *% 把当前目录下每个压缩的文件解压,并列出详细的信息。gzip -l *% 详细显示例1中每个压缩的文件的信息,并不解压。gzip usr.tar% 压缩 tar 备份文件 usr.tar,此时压缩文件的扩展名为.tar.gz。
linux-tar分卷压缩与解压缩 (2012-09-30 20:27:28)转载▼
标签: 举例说明 命令 文件 分包 分卷 育儿 分类: 工作相关
举例说明:
要将目录logs打包压缩并分割成多个1M的文件,可以用下面的命令:
tar cjf - logs/ |split -b 1m - logs.tar.bz2.
完成后会产生下列文件:
logs.tar.bz2.aa, logs.tar.bz2.ab, logs.tar.bz2.ac
要解压的时候只要执行下面的命令就可以了:
cat logs.tar.bz2.a* | tar xj
再举例:
要将文件test.pdf分包压缩成500 bytes的文件:
tar czf - test.pdf | split -b 500 - test.tar.gz
最后要提醒但是那两个”-“不要漏了,那是tar的ouput和split的input的参数。
tar cjf - logs/ |split -b 1m - logs.tar.bz2.
完成后会产生下列文件:
logs.tar.bz2.aa, logs.tar.bz2.ab, logs.tar.bz2.ac
要解压的时候只要执行下面的命令就可以了:
cat logs.tar.bz2.a* | tar xj
tar、gzip、unzip命令的详细使用方法备忘
amxku 发表于 2006-08-04, 00:55. 发表在: 技术相关
tar命令
tar可以为文件和目录创建档案。利用tar,用户可以为某一特定文件创建档案(备份文件),也可以在档案中改变文件,或者向档案中加入新的文 件。tar最初被用来在磁带上创建档案,现在,用户可以在任何设备上创建档案,如软盘。利用tar命令,可以把一大堆的文件和目录全部打包成一个文件,这 对于备份文件或将几个文件组合成为一个文件以便于网络传输是非常有用的。Linux上的tar是GNU版本的。
语法:tar [主选项+辅选项] 文件或者目录
使用该命令时,主选项是必须要有的,它告诉tar要做什么事情,辅选项是辅助使用的,可以选用。
主选项:
c 创建新的档案文件。如果用户想备份一个目录或是一些文件,就要选择这个选项。
r 把要存档的文件追加到档案文件的未尾。例如用户已经作好备份文件,又发现还有一个目录或是一些文件忘记备份了,这时可以使用该选项,将忘记的目录或文件追加到备份文件中。
t 列出档案文件的内容,查看已经备份了哪些文件。
u 更新文件。就是说,用新增的文件取代原备份文件,如果在备份文件中找不到要更新的文件,则把它追加到备份文件的最后。
x 从档案文件中释放文件。
辅助选项:
b 该选项是为磁带机设定的。其后跟一数字,用来说明区块的大小,系统预设值为20(20*512 bytes)。
f 使用档案文件或设备,这个选项通常是必选的。
k 保存已经存在的文件。例如我们把某个文件还原,在还原的过程中,遇到相同的文件,不会进行覆盖。
m 在还原文件时,把所有文件的修改时间设定为现在。
M 创建多卷的档案文件,以便在几个磁盘中存放。
v 详细报告tar处理的文件信息。如无此选项,tar不报告文件信息。
w 每一步都要求确认。
z 用gzip来压缩/解压缩文件,加上该选项后可以将档案文件进行压缩,但还原时也一定要使用该选项进行解压缩。
例1:把/home目录下包括它的子目录全部做备份文件,备份文件名为usr.tar。
$ tar cvf usr.tar /home
例2:把/home目录下包括它的子目录全部做备份文件,并进行压缩,备份文件名为usr.tar.gz 。
$ tar czvf usr.tar.gz /home
例3:把usr.tar.gz这个备份文件还原并解压缩。
$ tar xzvf usr.tar.gz
例4:查看usr.tar备份文件的内容,并以分屏方式显示在显示器上。
$ tar tvf usr.tar | more
要将文件备份到一个特定的设备,只需把设备名作为备份文件名。
例5:用户在/dev/fd0设备的软盘中创建一个备份文件,并将/home 目录中所有的文件都拷贝到备份文件中。
$ tar cf /dev/fd0 /home
要恢复设备磁盘中的文件,可使用xf选项:
$ tar xf /dev/fd0
如果用户备份的文件大小超过设备可用的存贮空间,如软盘,您可以创建一个多卷的tar备份文件。M选项指示tar命令提示您使用一个新的存贮设 备,当使用M选项向一个软驱进行存档时,tar命令在一张软盘已满的时候会提醒您再放入一张新的软盘。这样您就可以把tar档案存入几张磁盘中。
$ tar cMf /dev/fd0 /home
要恢复几张盘中的档案,只要将第一张放入软驱,然后输入有x和M选项的tar命令。在必要时您会被提醒放入另外一张软盘。
$ tar xMf /dev/fd0
gzip命令
减少文件大小有两个明显的好处,一是可以减少存储空间,二是通过网络传输文件时,可以减少传输的时间。gzip是在Linux系统中经常使用的一个对文件进行压缩和解压缩的命令,既方便又好用。
语法:gzip [选项] 压缩(解压缩)的文件名
各选项的含义:
-c 将输出写到标准输出上,并保留原有文件。
-d 将压缩文件解压。
-l 对每个压缩文件,显示下列字段:
压缩文件的大小
未压缩文件的大小
压缩比
未压缩文件的名字
-r 递归式地查找指定目录并压缩其中的所有文件或者是解压缩。
-t 测试,检查压缩文件是否完整。
-v 对每一个压缩和解压的文件,显示文件名和压缩比。
-num 用指定的数字num调整压缩的速度,-1或–fast表示最快压缩方法(低压缩比),-9或–best表示最慢压缩方法(高压缩比)。系统缺省值为6。
假设一个目录/home下有文件mm.txt、sort.txt、xx.com。
例1:把/home目录下的每个文件压缩成.gz文件。
$ cd /home
$ gzip *
$ ls
m.txt.gz sort.txt.gz xx.com.gz
例2:把例1中每个压缩的文件解压,并列出详细的信息。
$ gzip -dv *
mm.txt.gz 43.1%—–replaced with mm.txt
sort.txt.gz 43.1%—–replaced with sort.txt
xx.com.gz 43.1%—–replaced with xx.com
$ ls
mm.txt sort.txt xx.com
例3:详细显示例1中每个压缩的文件的信息,并不解压。
$ gzip -l *
compressed uncompr. ratio uncompressed_name
277 445 43.1% mm.txt
278 445 43.1% sort.txt
277 445 43.1% xx.com
$ ls
mm.txt.gz sort.txt.gz xx.com.gz
例4:压缩一个tar备份文件,如usr.tar,此时压缩文件的扩展名为.tar.gz
$ gzip usr.tar
$ ls
usr.tar.gz
unzip命令
用MS Windows下的压缩软件winzip压缩的文件如何在Linux系统下展开呢?可以用unzip命令,该命令用于解扩展名为.zip的压缩文件。
语法:unzip [选项] 压缩文件名.zip
各选项的含义分别为:
-x 文件列表 解压缩文件,但不包括指定的file文件。
-v 查看压缩文件目录,但不解压。
-t 测试文件有无损坏,但不解压。
-d 目录 把压缩文件解到指定目录下。
-z 只显示压缩文件的注解。
-n 不覆盖已经存在的文件。
-o 覆盖已存在的文件且不要求用户确认。
-j 不重建文档的目录结构,把所有文件解压到同一目录下。
例1:将压缩文件text.zip在当前目录下解压缩。
$ unzip text.zip
例2:将压缩文件text.zip在指定目录/tmp下解压缩,如果已有相同的文件存在,要求unzip命令不覆盖原先的文件。
$ unzip -n text.zip -d /tmp
例3:查看压缩文件目录,但不解压。
$ unzip -v text.zip
zgrep命令
这个命令的功能是在压缩文件中寻找匹配的正则表达式,用法和grep命令一样,只不过操作的对象是压缩文件。如果用户想看看在某个压缩文件中有没有某一句话,便可用zgrep命令。
Backup alias
-o (set Output directory) switch
1 | 7z x archive.zip -oc:\Doc |
1 | alias 7zb='7z a ${PWD##*/}_backup-passwd_`date +%Y%m%d%H%M%S`.7z *' |
Application Installation
AnyDesk
1 | axel https://download.anydesk.com/linux/anydesk_6.1.0-1_amd64.deb |
Hackage: The Haskell Package Repository
Hackage is the Haskell community’s central package archive of open source software. Hackage has been online since January 2007 and is constantly growing. You can publish libraries and programs or download and install packages with tools like cabal-install (or via your distro’s package manager).
Shashlik/Android emulator
1 | wget http://static.davidedmundson.co.uk/shashlik/shashlik_0.9.3.deb |
xml2x 0.4.2 on Hackage - Libraries.io
1 | cabal install xml2x-0.4.2` |
Ubuntu Downloads & Install Instructions for uGet
1 | sudo add-apt-repository ppa:plushuang-tw/uget-stable |
How to install Calligra 3.0.1 Office Suite on Ubuntu
1 | sudo apt-get update && sudo apt-get install calligra |
How to Install OnlyOffice on Ubuntu 16.04 LTS - LinuxBabe
Docker installation
OnlyOffice installation
Yandex
- HOW TO INSTALL YANDEX BROWSER IN UBUNTU 16.04
- Install Yandex Browser on Debian, Ubuntu, Fedora, OpenSUSE, Arch
VYM - View Your Mind
The very latest version you can always get thelatest version directly from
openSUSE BuildService, please check the URL above
(or here: http://download.opensuse.org/repositories/home%3A//insilmaril/)
If you prefer the older “original” Ubuntu packages, you can
1 | apt-get install vym |
There is also a Kubuntu link:
http://packages.debian.org/unstable/kde/vym
YouTube-DL
- Install YouTube-DL - A Command Line Video Download Tool for Linux
- software recommendation - How do I download a YouTube video? - Ask Ubuntu
Ubuntu users can download and install latest youtube-dl version from the webupd8 PPA as shown.
1 | sudo add-apt-repository ppa:nilarimogard/webupd8 |
Update: Similarly, instead using any third party PPA, you can use curl or wget command to install latest version of youtube-dl script as shown.
1 | sudo curl https://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl |
After downloading the script, set the executable permission.
1 | sudo chmod a+rx /usr/local/bin/youtube-dl |
synapse
1 | sudo add-apt-repository ppa:synapse-core/ppa |
WeChat【微信】
1 | cd cp /media/ht/ht_5T/Stored_Softs/Linux_Softs/Not_Classified/ |
如何在Ubuntu中安装electronic-wechat微信客户端 • 系统极客
通过Snap在Ubuntu中安装微信
Snap 使得在 Linux 中安装 electronic-wechat 微信客户端变得非常容易,不过在此之前需要通过如下命令先安装 snapd 和 snapd-xdg-open:
sudo apt install snapd snapd-xdg-open
完成之后就可以使用如下命令安装 electronic-wechat 微信客户端:
sudo snap install electronic-wechat
安装完成后可以在终端中直接执行 electronic-wechat 打开它。当你首次启动它时,需要在手机上扫描二维码登录。
在手机上打开微信扫描二维码之后就可以开始使用了,其功能与 Windows 及 macOS 版本中的微信客户端非常相似,大家自己上手。
XMind
XMind6
http://www.xmind.net/xmind/downloads/xmind-linux-3.5.3.201506180105_amd64.deb
Freemind
1 | wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add - |
SeaMonkey
HTML editor
- software installation - Why isn’t Mozilla SeaMonkey available in the repositories? How can I install it? - Ask Ubuntu
- How To Install SeaMonkey 2.25 On Ubuntu 14.04,13.10,12.10,12.04, Linux Mint 16,14,13 And Elementary OS 0.2 | LinuxG.net
1 | echo -e "\ndeb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main" | sudo tee -a /etc/apt/sources.list > /dev/null |
Calibre [^Calibre]
Installation via synaptic
1 | sudo apt-get update |
[^Calibre]: software installation - How to install Calibre on Ubuntu 12.04 - Ask Ubuntu
calibre - Download for linux
vokoscreen
1 | sudo apt install vokoscreen |
SimpleScreenRecorder
Main page - SimpleScreenRecorder - Maarten Baert’s website
Install ‘simplescreenrecorder’ and optionally ‘simplescreenrecorder-lib:i386’ (if you want to record 32-bit OpenGL applications on a 64-bit system) from the SimpleScreenRecorder PPA:
1 | sudo add-apt-repository ppa:maarten-baert/simplescreenrecorder |
Alternatively, you can install the simplescreenrecorder package from GetDeb.
Shutter
1 | sudo apt-get install libgd-perl |
TeamViewer
下载的64位deb文件无法在64位机安装。
Installation of Google Drive
An Official Google Drive for Linux is Here, Sort Of — Maybe This Is All We’ll Ever Get
1 | sudo apt-get install golang git mercurial |
Dock
Installation
1 | sudo add-apt-repository ppa:ricotz/docky |
Removal
1 | sudo add-apt-repository -r ppa:ricotz/docky |
Configuration
1 | ~/.config/plank/dock1/settings |
Cairo-Dock
Home Lubuntu 64 bit
lubuntu 14.04 - cairo-dock missfunctions - Ask Ubuntu
This is caused by compositing emulation provided by Cairo Dock. By right you should use real composition for jobs like this.
- This is how you can get composition in Lubuntu 14.04
1 | sudo apt-get install compton |
- Go to Applications menu, Preferences, Default Applications for Lxsession.
- Go to autostart, add another startup process compton -b
Log out and log in back then you should able to use the dock nicely after disable Composition Emulation in Cairo settings.
== Enable the PPA in your list of repositories ==
Execute the following commands in a terminal (be careful when you copy-paste, the 2nd line is quite long so it may appear cut in your browser, but it’s a single line) :
1 | sudo -v |
== Install the dock ==
Execute the following command in a terminal:
1 | sudo add-apt-repository ppa:cairo-dock-team/ppa |
Removal of black box
- apt-get install xcompmgr
- gconftool-2 –type bool –set /apps/metacity/general/compositing_manager true
Plank
Plank (Simplest Dock)
1 | sudo add-apt-repository ppa:ricotz/docky |
Removal of Cairo-Dock
1 | sudo apt-get purge cairo-dock cairo-dock-plug-ins && sudo apt-get autoremove |
Plank
1 | sudo apt-add-repository ppa:ricotz/docky |
大家可以根据介绍来进行配置,其中position 选项是指Plank 的显示位置,其可能值为:
- 0 = 左边
- 1 = 右边
- 2 = 顶部
- 3 = 底部
配置完之后保存退出即可。
Plank 更换主题说明:
1 | Plank 是支持皮肤主题功能的,皮肤主题文件位于**~/.config/plank/theme/**中,如果你想修改主题请先对现有的主题进行备份: |
Grive
Installation Steps of grive-tools
1 | Step:1 Add grive-tools PPA using below Command : |
Setup
Chromium
PPA
1 | deb http://ppa.launchpad.net/chromium-daily/stable/ubuntu trusty main |
Another PPA (choose one of three)
1 | sudo add-apt-repository ppa:chromium-daily/stable |
Note: If you have some problems upgrading the dev or daily channels you may try this:
- Close all the chromium trays (if you have any open) or close all the procces tree with the system monitor (or just kill the procces with the terminal).
- Just use one of the channels, don’t add the 3 ppa, becuase they’ll get stuck. The -sudo apt-get install chromium-browser- is the same for all 3
- Erase the old Chromium version at ~/.config/chromium/Default (erase all the Default folder). After you erase it run the apt-get install command again.
Google Chrome
1 | /usr/bin/google-chrome-unstable %U |
QQ with Pidgin (lwqq)
Install On Linux · xiehuc/pidgin-lwqq Wiki · GitHub
Ubuntu via PPA
添加仓库并更新
1 | $ sudo add-apt-repository ppa:lainme/pidgin-lwqq |
安装
1 | $ sudo apt-get install pidgin-lwqq |
PPA 也可以用于 Debian,但不保证一定能工作。另外,pidgin-lwqq-unstable 已经不再支持和更新。如果你遇到任何问题,请联系 lainme [lainme993@gmail.com][15]
fcitx
- 先卸载IBUS输入法
1 | killall ibus-daemon |
Downloaders
1 | sudo apt-get install uget aria2 axel |
- uget
1 | sudo apt-get install uget aria2 |
- JDownloader
1 | sudo add-apt-repository ppa:jd-team/jdownloader |
- aria2
After installation
Monitor adjustment
1 | setsid chromium-browser /media/ht/ht_5T/Work/References/Computer_Tips/Linux_Tips/Not_Classified/Display_Resolution_Adjustment_in_Lubuntu.html |
Application installation
1 | #!/usr/bin/python |
CRAN
1 | install.packages("DT", "rmarkdown", "pander", "readxl") |
EOF