手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表2024年09月的文章

-开头的文件在linux系统下无法直接删除

 如题。如果文件是"-test.log",是的你没看错。文件名前面有一个减号。如果你直接使用:rm -test.log,会报如下错误:

XML/HTML代码
  1. rm: invalid option -- 't'  
  2. Try 'rm ./-test.log' to remove the file ‘-test.log’.  
  3. Try 'rm --help' for more information.  

毕竟。- 是有特殊意义的。那怎么删除呢?也简单:

XML/HTML代码
  1. rm -- -test.log  

文件就这样被删除了。事实上,象这种"-"(减号、负号)开头的文件。因为它自带的特殊意义(linux下命令行的参数前缀),所以你用touch\vim等命令,其实都无法创建这样的文件。不信你试试"touch -test.log"。当然,你也是可以用touch -- -test.log来创建(其他类似)

 

 

wow, macjournal 又回来了

Wow。。如题。MacJournal又回来了。这个软件好象是被收购还是啥的。于是乎感觉六、七年没有更新的样子。今天打开官网,居然看到这么一段:
XML/HTML代码
  1. Hello everyone! After a long and productive relationship with Mariner Software, MacJournal is returning home to be distributed here by its original developer. There are a few important details that will have to change as a result. First of all, MacJournal will be distributed exclusively on this website for now. The versions on the various App Stores will be removed as current App Store rules do not allow us to transfer them. Secondly, MacJournal will be distributed for free, just as it was when it got started almost 18 years ago. Third, there is a new version out today! You can see details for version 7 on this site and download the release now. Prior versions running on systems that can support version 7 will see an automatic update later this week. And finally, since support will also be back to a single person, support via email will be constrained. I will try to get back to everyone that writes, but there could be some delays so I thank everyone for their patience in advance. I'm excited about this next chapter of MacJournal and about the new release!  
然后看了一下更新记录,平均每两三个月更新一次。快的话一个月更新2次。作者这是要拼命的节奏啊。
说实话,羡慕这些独立开发者,能够支撑得下来。
 
 
 

leetcode...本来想刷的的,结果心情全没了

 用微博链过去注册,给我自己分配的用户名是:

大小: 11 K
尺寸: 411 x 107
浏览: 1578 次
点击打开新窗口浏览全图

这太奇怪了,于是,我查了下汉典:

大小: 96.11 K
尺寸: 490 x 376
浏览: 1652 次
点击打开新窗口浏览全图

这不是多音字啊。。。SHIT,心情都没了

 

 

 

mac office 365的excel超级卡

这个问题据说很多人遇到过。你搜索:excel 卡,大部分都应该是mac的。然而查了 下官网,也没有什么好办法,甚至官网的support都只说,你可以试一下重启进入安全模式再看看。。。
 
然而网上也有说法,说是更新补丁后快了很多。于是这些操作我都做了,却并没有什么改善
这时候我在想是不是因为我是升级上来的原因?我从2016-》2019-》office 365,这样升过来的,会不会有问题?于是到参考 官网资料,将office 卸载了。然后重新下载了1.5G的安装包进行安装
下载时间不长,大约半小时。。安装更快,2分钟。占掉我8G的空间。当时心里就在祈祷,你丫要是再卡,我就不鸟你了。
再次打开那个100多K,800多行,纯文本的excel文件(不含任何计算)。速度飞起来了。(果然这年头还是需要卸载重装才能解决问题)
 
重装大法就是好!

vsc 跳板机 设置

 比较简单的设置,就是利用 sshconfig 。

  1. 3、如果服务器需要通过跳板机登录(跳板机需要走本地网络代理)  
  2.   
  3. 首先配置跳板机ssh  
  4.   
  5. Host jumper  
  6.   HostName yyy.yyy.yyy.yyy # 跳板机IP,跳板机~/.ssh/authorized_keys需要配置ssh公钥  
  7.   User root  
  8.   ForwardAgent yes  
  9.   IdentityFile /Users/aslinwang/.ssh/id_ecdsa  
  10.   ProxyCommand corkscrew 127.0.0.1 12679 %h %p  
  11. 然后通过跳板机访问服务器  
  12.   
  13. Host aslin  
  14.   HostName xxx.xxx.xxx.xxx # 远程服务器IP,~/.ssh/authorized_keys需要配置ssh公钥  
  15.   User root  
  16.   ForwardAgent yes  
  17.   IdentityFile /Users/aslinwang/.ssh/id_ecdsa  
  18.   ProxyCommand ssh jumper -W %h:%p 2> /dev/null  
如果你不用 公钥,那可以尝试用sshpass (即,输密码式的登录):
XML/HTML代码
  1. Host aslin  
  2.   HostName xxx.xxx.xxx.xxx # 远程服务器IP,~/.ssh/authorized_keys需要配置ssh公钥  
  3.   User root  
  4.   ForwardAgent yes  
  5.   IdentityFile /Users/aslinwang/.ssh/id_ecdsa  
  6.   ProxyCommand sshpass -p [跳板机密码] ssh -p [跳板机端口] root@[跳板机IP] -W %h:%p 2> /dev/null  
 ------EOF----
文中的aslinwang是上述网址文章中的用户,如果是你自己的,就是/Users/用户名/,相信能找到这里的人应该都明白
 
 
 
 
 
 

Tags: vsc, sshpass