js css html

【R】Rstudio Project如何找回误删的代码

2022-11-19  本文已影响0人  caokai001

背景:

找回代码的步骤:

1.进入Project的根目录,找到.Rproj.user/文件夹

查看.Rproj.user隐藏文件

image.png

Rstudio网页端查看方法:

image.png

2.进入对应session下的sources文件夹检索,如./E66F143E/sources,按时序检索

找到自己的folder

cd .Rproj.user/
ll -t

找到自己文件夹:


image.png

3. 再用grep检索关键字,如

请输入代码块名称
grep -rnw ./2C008A59/sources/ -e '# Measurement of variance'
grep -rn ./E66F143E/sources/ -e 'write_feather'
image.png
cd ./E66F143E/sources
ll -t
image.png

ls -t ; Find 找到这几个文件时间,优先查看最新的文件;

image
image image image

4.比较相似的几个文件差异

推荐BCompare

image.png

😀😀😀 祝各位小伙伴找回自己的文件!

参考:

https://zhuanlan.zhihu.com/p/34725743

https://d.cosx.org/d/420082-rstudio-server

上一篇 下一篇

猜你喜欢

热点阅读