AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[copy](ubuntu)

Martin Hope
Tasmotanizer
Asked: 2023-03-30 01:44:45 +0800 CST

如何最好地复制大文件夹?

  • 5

我想通过终端将 1 TB 的数据从 1 个硬盘复制到另一个硬盘。

最好的方法是什么?

到目前为止,我已经使用了以下内容,但我不知道它是否真的取得了进展,或者它是否只是冻结了窗口:

sudo cp -r /mnt/CloudDrive1 /mnt/CloudDrive2

copy
  • 1 个回答
  • 24 Views
Martin Hope
Praveen
Asked: 2020-11-04 05:27:16 +0800 CST

从文本文件到另一个模式之间的命令行内容复制

  • 0

我将 html 文件内容复制到以下形式的文本文件中:

... course 10> user_1 </a><br /><a class="reviewlink" href="https://www.foo.com/moodle/mod/quiz/review.php?attempt=1491">Review attempt<...
... course 10> user_2 </a><br /><a class="reviewlink" href="https://www.foo.com/moodle/mod/quiz/review.php?attempt=1498">Review attempt<...

从这里使用一些shell命令我可以得到内容:

user_1 "https://www.foo.com/moodle/mod/quiz/review.php?attempt=1491"
user_2 "https://www.foo.com/moodle/mod/quiz/review.php?attempt=1498"

到另一个文本文件。

这里...表示一些大的独特文本。

编辑

为用户提供更详细的表格:

 <label for="attemptid_1502" class="accesshide">Select attempt</label></td><td class="cell c1 picture" id="mod-quiz-report-responses-report_r1_c1"><a href="https://www.foo.com/moodle/user/view.php?id=380&amp;course=10" class="d-inline-block aabtn"><img src="https://www.foo.com/moodle/pluginfile.php/419/user/icon/moove/f2?rev=6942" class="userpicture" width="35" height="35" alt="Picture of user 1" title="Picture of user 1" /></a></td><td class="cell c2 bold" id="mod-quiz-report-responses-report_r1_c2"><a href="https://www.foo.com/moodle/user/view.php?id=380&amp;course=10">user 1</a><br /><a class="reviewlink" href="https://www.foo.com/moodle/mod/quiz/review.php?attempt=1502">Review attempt</a></td><td class="cell c3" id="mod-quiz-report-responses-report_r1_c3">meethu</td><td class="cell c4" id="mod-quiz-report-responses-report_r1_c4">text</td><td class="cell c5" id="mod-quiz-report-responses-report_r1_c5">Finished</td><td class="cell c6 bold" id="mod-quiz-report-responses-report_r1_c6"><a href="review.php?q=62&amp;attempt=1502">0.00</a></td><td class="cell c7" id="mod-quiz-report-responses-report_r1_c7"><a href="https://www.foo.com/moodle/mod/quiz/reviewquestion.php?attempt=1502&slot=1" id="action_link5fa01d6f2fd9a29" class=""  title="Review response" ><span class="que"><i class="icon fa fa-remove text-danger fa-fw icon"  title="Incorrect" aria-label="Incorrect"></i><span class="notanswered">-</span></span></a></td><td class="cell c8" id="mod-quiz-report-responses-report_r1_c8"><a href="https://www.foo.com/moodle/mod/quiz/reviewquestion.php?attempt=1502&slot=2" id="action_link5fa01d6f2fd9a30" class=""  title="Review response" ><span class="que"><i class="icon fa fa-remove text-danger fa-fw icon"  title="Incorrect" aria-label="Incorrect"></i><span class="notanswered">-</span></span></a></td><td class="cell c9" id="mod-quiz-report-responses-report_r1_c9"><a href="https://www.foo.com/moodle/mod/quiz/reviewquestion.php?attempt=1502&slot=3" id="action_link5fa01d6f2fd9a31" class=""  title="Review response" ><span class="que"><i class="icon fa fa-remove text-danger fa-fw icon"  title="Incorrect" aria-label="Incorrect"></i><span class="notanswered">-</span></span></a></td><td class="cell c10" id="mod-quiz-report-responses-report_r1_c10"><a href="https://www.foo.com/moodle/mod/quiz/reviewquestion.php?attempt=1502&slot=4" id="action_link5fa01d6f2fd9a32" class=""  title="Review response" ><span class="que"><i class="icon fa fa-remove text-danger fa-fw icon"  title="Incorrect" aria-label="Incorrect"></i><span class="notanswered">-</span></span></a></td><td class="cell c11" id="mod-quiz-report-responses-report_r1_c11"><a href="https://www.foo.com/moodle/mod/quiz/reviewquestion.php?attempt=1502&slot=5" id="action_link5fa01d6f2fd9a33" class=""  title="Review response" ><span class="que"><i class="icon fa fa-remove text-danger fa-fw icon"  title="Incorrect" aria-label="Incorrect"></i><span class="notanswered">-</span></span></a></td><td class="cell c12" id="mod-quiz-report-responses-report_r1_c12"><a href="https://www.foo.com/moodle/mod/quiz/reviewquestion.php?attempt=1502&slot=6" id="action_link5fa01d6f2fd9a34" class=""  title="Review response" ><span class="que"><i class="icon fa fa-remove text-danger fa-fw icon"  title="Incorrect" aria-label="Incorrect"></i><span class="notanswered">-</span></span></a></td><td class="cell c13" id="mod-quiz-report-responses-report_r1_c13"><a href="https://www.foo.com/moodle/mod/quiz/reviewquestion.php?attempt=1502&slot=7" id="action_link5fa01d6f2fd9a35" class=""  title="Review response" ><span class="que"><i class="icon fa fa-remove text-danger fa-fw icon"  title="Incorrect" aria-label="Incorrect"></i><span class="notanswered">-</span></span></a></td><td class="cell c14" id="mod-quiz-report-responses-report_r1_c14"><a href="https://www.foo.com/moodle/mod/quiz/reviewquestion.php?attempt=1502&slot=8" id="action_link5fa01d6f2fd9a36" class=""  title="Review response" ><span class="que"><i class="icon fa fa-remove text-danger fa-fw icon"  title="Incorrect" aria-label="Incorrect"></i><span class="notanswered">-</span></span></a></td><td class="cell c15" id="mod-quiz-report-responses-report_r1_c15"><a href="https://www.foo.com/moodle/mod/quiz/reviewquestion.php?attempt=1502&slot=9" id="action_link5fa01d6f2fd9a37" class=""  title="Review response" ><span class="que"><i class="icon fa fa-remove text-danger fa-fw icon"  title="Incorrect" aria-label="Incorrect"></i><span class="notanswered">-</span></span></a></td><td class="cell c16" id="mod-quiz-report-responses-report_r1_c16"><a href="https://www.foo.com/moodle/mod/quiz/reviewquestion.php?attempt=1502&slot=10" id="action_link5fa01d6f2fd9a38" class=""  title="Review response" ><span class="que"><i class="icon fa fa-remove text-danger fa-fw icon"  title="Incorrect" aria-label="Incorrect"></i><span class="notanswered">-</span></span></a></td><td class="cell c17" id="mod-quiz-report-responses-report_r1_c17"><a href="https://www.foo.com/moodle/mod/quiz/reviewquestion.php?attempt=1502&slot=11" id="action_link5fa01d6f2fd9a39" class=""  title="Review response" ><span class="que"><i class="icon fa fa-remove text-danger fa-fw icon"  title="Incorrect" aria-label="Incorrect"></i><span class="notanswered">-</span></span></a></td><td class="cell c18" id="mod-quiz-report-responses-report_r1_c18"><a href="https://www.foo.com/moodle/mod/quiz/reviewquestion.php?attempt=1502&slot=12" id="action_link5fa01d6f2fd9a40" class=""  title="Review response" ><span class="que"><i class="icon fa fa-remove text-danger fa-fw icon"  title="Incorrect" aria-label="Incorrect"></i><span class="notanswered">-</span></span></a></td><td class="cell c19" id="mod-quiz-report-responses-report_r1_c19"><a href="https://www.foo.com/moodle/mod/quiz/reviewquestion.php?attempt=1502&slot=13" id="action_link5fa01d6f2fd9a41" class=""  title="Review response" ><span class="que"><i class="icon fa fa-remove text-danger fa-fw icon"  title="Incorrect" aria-label="Incorrect"></i><span class="notanswered">-</span></span></a></td></tr><tr class="" id="mod-quiz-report-responses-report_r2"><td class="cell c0" id="mod-quiz-report-responses-report_r2_c0"><input id="attemptid_1505" name="attemptid[]" type="checkbox"  value="1505"
   data-action="toggle"
   data-toggle="slave"
   data-togglegroup="quiz-attempts"
   
/>
scripts command-line bash sed copy
  • 2 个回答
  • 50 Views
Martin Hope
pat
Asked: 2020-10-23 00:56:31 +0800 CST

Systemback 1.9.4 - Errno: 22 在系统复制期间

  • 0

将我的系统(包括用户数据副本)复制到内部 HD,systemback 因错误 22 而停止并中止了复制。

在此处输入图像描述

尝试使用 DBGLEV=3 systemback-sustart进行跟踪,结果如下:

p_metheny99@jarvis:~$ DBGLEV=3 systemback-sustart
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'

 Systemback

 Version: 1.9.4_05.02.2020_Qt5.12.8_GCC9.3.0_amd64
 Compilation date and time: Apr 15 2018 12:44:46
 Installed files: /etc/xdg/autostart/sbschedule-kde.desktop
                  /etc/xdg/autostart/sbschedule.desktop
                  /usr/bin/systemback
                  /usr/bin/systemback-cli
                  /usr/bin/systemback-sustart
                  /usr/lib/systemback/libsystemback.so
                  /usr/lib/systemback/libsystemback.so.1
                  /usr/lib/systemback/libsystemback.so.1.0
                  /usr/lib/systemback/libsystemback.so.1.0.0
                  /usr/lib/systemback/sbscheduler
                  /usr/lib/systemback/sbsustart
                  /usr/lib/systemback/sbsysupgrade
                  /usr/share/applications/systemback-kde.desktop
                  /usr/share/applications/systemback.desktop
                  /usr/share/systemback/efi-amd64.bootfiles
                  /usr/share/systemback/lang/systemback_ar_EG.qm
                  /usr/share/systemback/lang/systemback_ca_ES.qm
                  /usr/share/systemback/lang/systemback_cs.qm
                  /usr/share/systemback/lang/systemback_da_DK.qm
                  /usr/share/systemback/lang/systemback_de.qm
                  /usr/share/systemback/lang/systemback_en_GB.qm
                  /usr/share/systemback/lang/systemback_es.qm
                  /usr/share/systemback/lang/systemback_fi.qm
                  /usr/share/systemback/lang/systemback_fr.qm
                  /usr/share/systemback/lang/systemback_gl_ES.qm
                  /usr/share/systemback/lang/systemback_hu.qm
                  /usr/share/systemback/lang/systemback_id.qm
                  /usr/share/systemback/lang/systemback_pt_BR.qm
                  /usr/share/systemback/lang/systemback_ro.qm
                  /usr/share/systemback/lang/systemback_ru.qm
                  /usr/share/systemback/lang/systemback_tr.qm
                  /usr/share/systemback/lang/systemback_uk.qm
                  /usr/share/systemback/lang/systemback_zh_CN.qm
 Operating system: Ubuntu 20.04.1 LTS
 Mounted filesystems: /dev/sdc4 / ext4 rw,relatime,errors=remount-ro 0 0
                      /dev/sdc1 /boot/efi vfat rw,relatime,fmask=0077,dmask=007
                      7,codepage=437,iocharset=iso8859-1,shortname=mixed,errors
                      =remount-ro 0 0
                      /dev/sdc3 /home ext4 rw,relatime 0 0
 System language: it_IT
 Translation: -

mke2fs 1.45.5 (07-Jan-2020)
/dev/sdb5 contiene un file system ext4 con etichetta "SB@"
    last mounted on /.sbsystemcopy on Wed Oct 21 17:04:04 2020
Discarding device blocks: fatto                            
Creazione del file system con 12875520 4k blocchi e 3219456 inode
Etichetta del file system=21cfa7dc-0de7-485f-a111-a56c71c67c6f
Backup del superblocco salvati nei blocchi: 
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
    4096000, 7962624, 11239424

Allocating group tables: fatto                            
Scrittura delle tavole degli inode: fatto                            
Creating journal (65536 blocks): fatto
Scrittura delle informazioni dei super-blocchi e dell'accounting del file system: fatto  


 An error occurred while cloning the following file:

 
 /home/p_metheny99/Documenti/PC_ASUS_VivoBook_Pro_15_N580GD_NVIDIA_problemi_vari/EDIT_GRUB_E_INSTALLA_DRIVER_NVIDIA

 Target file:

 
 /.sbsystemcopy/home/p_metheny99/Documenti/PC_ASUS_VivoBook_Pro_15_N580GD_NVIDIA_problemi_vari/EDIT_GRUB_E_INSTALLA_DRIVER_NVIDIA


 /home/p_metheny99/Documenti/PC_ASUS_VivoBook_Pro_15_N580GD_NVIDIA_problemi_vari/EDIT_GRUB_E_INSTALLA_DRIVER_NVIDIA
  d rwx------ - 1000 1000 2083 -

 /home/p_metheny99/Documenti/PC_ASUS_VivoBook_Pro_15_N580GD_NVIDIA_problemi_vari
  d rwx------ - 1000 1000 2083 -
 /home/p_metheny99/Documenti
  d rwx------ - 1000 1000 2083 -
 /home/p_metheny99
  d rwxr-xr-x - 1000 1000 2083 -
 /home
  d rwxr-xr-x - 0 0 2083 -


 /.sbsystemcopy/home/p_metheny99/Documenti/PC_ASUS_VivoBook_Pro_15_N580GD_NVIDIA_problemi_vari/EDIT_GRUB_E_INSTALLA_DRIVER_NVIDIA
  f rwx------ 1 0 0 2069 0B

 /.sbsystemcopy/home/p_metheny99/Documenti/PC_ASUS_VivoBook_Pro_15_N580GD_NVIDIA_problemi_vari
  d rwxr-xr-x - 0 0 2069 -
 /.sbsystemcopy/home/p_metheny99/Documenti
  d rwxr-xr-x - 0 0 2069 -
 /.sbsystemcopy/home/p_metheny99
  d rwxr-xr-x - 1000 1000 2069 -
 /.sbsystemcopy/home
  d rwxr-xr-x - 0 0 2069 -
 /.sbsystemcopy
  d rwxr-xr-x - 0 0 2069 -

 Errno: 22

/home 目录中所有文件的复制可以使用文件管理器中的正常复制/粘贴来完成,但不能使用包含用户数据的 systemback 复制选项。

copy 20.04 systemback
  • 1 个回答
  • 626 Views
Martin Hope
Jerry wu
Asked: 2020-10-13 09:48:35 +0800 CST

如何通过在Ubuntu 20.04.1中直接拖动来将文件从目录复制到桌面[重复]

  • 0
这个问题在这里已经有了答案:
基本桌面操作在 Ubuntu 20.04 上不可用 4 个答案
1 年前关闭。

我是 Ubuntu 的新手,我尝试将文件直接从折叠拖动到桌面,以便像在 Windows 中那样复制文件。但它不起作用。我知道如何在终端中执行此操作,并且我禁用了实验视图,并且能够在文件夹之间拖动文件以复制它们。我只是想知道为什么我不能将它拖放到桌面上?Ubuntu不支持吗?

copy
  • 4 个回答
  • 657 Views
Martin Hope
lo tolmencre
Asked: 2020-08-19 12:27:09 +0800 CST

从终端复制文件并粘贴到 GUI 中,反之亦然

  • 0

有没有办法使用终端命令复制文件,然后通过 GUI 将其粘贴到某处?我只是想知道。到目前为止,我从未想过这一点,但有时这真的很方便。会这样工作:

$ copytogui <some file>
  • d在文件浏览器中打开某个目录
  • 按ctrl-v
  • <some file>已复制到d

反之亦然,用于从 GUI 窗口复制到终端。

gui command-line files copy paste
  • 1 个回答
  • 923 Views
Martin Hope
scribe
Asked: 2020-07-09 14:36:13 +0800 CST

将根“/”中的所有内容复制到外部存储卷的适当命令?

  • 7

我想在/升级操作系统之前将 root 中的所有内容复制到我的外部硬盘上,这样我就可以拥有所有内容,以防万一出现问题。以下是最合适的命令吗?

username@machine:/$ sudo cp -r . /media/username/TOSHIBA\ EXT/root_copy/
backup external-hdd copy
  • 5 个回答
  • 3395 Views
Martin Hope
Dhrpa
Asked: 2020-06-19 07:32:00 +0800 CST

复制和重命名文件

  • 0

我正在尝试从单独的文件夹中复制多个文件并将它们粘贴到具有新文件名的新文件夹中。任何人都可以帮助我吗?例如:我有文件夹 1,2,3,4,5,每个文件夹都有 filex.txt 我希望从每个文件夹中获取 file.txt 并将其重命名为 1filex、2filex、3filex、4filex、5filex 和他们的新位置为文件夹abc。

任何帮助将不胜感激。

谢谢

rename copy
  • 2 个回答
  • 493 Views
Martin Hope
kim
Asked: 2020-06-11 14:39:36 +0800 CST

如何在 ubuntu 18.04 中将文件从 docker 容器传输/复制到本地目录?

  • 1

我正在使用带有虚拟机的 ubuntu 18.04 在远程 GPU 服务器中运行我的程序。我在 docker 中运行我的程序,我想将 docker 容器中的绘图文件传输到我的虚拟机中的本地文件目录。我曾经scp将本地文件从虚拟机传输到 docker 容器,但现在我想传输我的程序的结果,将文件绘制回我的虚拟机中的本地文件目录。我怎样才能在 Ubuntu 中做到这一点?任何想法?

这是我之前所做的:

scp -P 8080 ./Downloads/my_func.py [email protected]:data

对我来说,将文件从本地传输到远程 docker 容器效果很好,但是反向不起作用或者我在命令中出错了。

这是当前驻留在 docker 容器中的文件列表(来自 docker shell):

root@d3576359f9ac:/data# ls
cnn_mobnet.py              cnn_ResNet50.py  cnn_mobnet_v1.py
cnn.py    cnn_mobnet_loss_curve.png  cnn_00.py        mobnet_test.py

我的尝试:

我试图复制cnn_mobnet_loss_curve.png到我的虚拟机中的本地文件目录,但它不起作用:

scp data/cnn_mobnet_loss_curve.png :./Downloads

我也试过docker cp data/cnn_mobnet_loss_curve.png :./Downloads,但它给了我一个错误,说 docker 命令无法识别。任何想法?从 docker shell,如何将 docker 容器中的文件传输或复制到本地文件目录?任何想法?

我想在我的虚拟机cnn_mobnet_loss_curve.png中的当前 docker 容器中复制或传输到其中。./Downloads我怎样才能做到这一点?在 Ubuntu 中将文件从远程 docker 容器传输到本地的任何想法?如何从 Ubuntu 的终端执行此操作?任何想法?

virtualbox scp docker copy
  • 2 个回答
  • 701 Views
Martin Hope
UsDAnDreS
Asked: 2020-06-09 20:19:07 +0800 CST

哪些文件夹是绝对安全的,可以从旧的 18.04 ubuntu 机器复制到新的 20.04 ubuntu 机器(无需将前者更新到 20.04)

  • 2

我知道这个问题可能会作为

如何安全地将主文件夹从 10.04 桌面复制到笔记本上新的 ubuntu 12.04 安装?

如果它没有带来任何新价值,请随意删除,但鉴于已经过去了很长一段时间 + 有人描述了他们的系统在尝试完全复制 /home 目录后崩溃的经历,我只是想重新点燃一秒钟的话题。

我有一台旧的戴尔,上面安装了 Ubuntu 18.04 干净(不是双启动),我刚买了一台联想,我也安装了 Ubuntu 20.04。我想知道是否有一组被认为非常安全的文件夹可以简单地复制到新系统中?除了明显无害的东西,如基本文本文件(带注释)、电子表格、图片、视频等

例如,我可以复制 bin 文件夹吗?快照文件夹?第三方安装(例如在我的案例中包含 R/Python 编程软件的文件夹)?“隐藏”文件夹(如“./config”)呢?

只是我确实害怕尝试使用黑盒克隆选项,同时我也不介意花时间从 ~0ish 重新构建系统。原因是因为它不像我在旧笔记本电脑上建立了一个帝国,原因如下:去年秋天我试图从 16.04 更新到 18.04,它使系统崩溃而无法恢复(是的,我没有支持它,吸取了教训),所以从那以后我真的没有机会过度定制它。因此,您可能也了解我的 PTSD 关于此事件的情况,从而导致不愿意将我的旧系统升级到 20.04 以获得更好的兼容性(尽管我正在备份它)。

home-directory 18.04 copy 20.04
  • 1 个回答
  • 99 Views
Martin Hope
Sarangan
Asked: 2020-04-22 20:03:37 +0800 CST

同时复制和重命名

  • 1

我需要从复制sample.txt到foo/粘贴bar/时bar/应该重命名为test.txt

我需要为此使用什么命令?

command-line rename copy
  • 1 个回答
  • 5944 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve