Navigation

    UBports Robot Logo

    UBports Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Copy or cut with terminal

    Support
    2
    6
    61
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      domubpkm last edited by

      If I understand correctly, the only way that currently should work with the Pinephone to copy or cut a file from one directory to another is to use the terminal. This way should also work with all UT smartphones.
      I tried different usual syntaxes on UT smartphones (Pinephone RC, OPO DEV ) and it doesn't work and I don't understand why!
      Dossier A Dossier B 20200917_143338592.png
      Dossier A certif 20200917_143352860.png

      An example: considering Folder A and Folder B, (screenshots as a basis for the example), which are the right synthaxes to copy certificate.pdf from Folder A to Folder B or move certificate.pdf to Folder B?
      Ps: please check that this works well (in DEV or RC ) before your feedback !
      In advance, thank you very much !!

      arubislander 1 Reply Last reply Reply Quote 0
      • arubislander
        arubislander @domubpkm last edited by arubislander

        @domubpkm: It would have helped those trying to help if you had shown what you had already tried and what were the error messages, if any. Saves others from trying the same, or else helps us see where it might have gone wrong. As it is now, trying to help feels like setting out on some kind of treasure hunt.

        (For those, as I was, not aware of why a simple copy / paste in the File Manager app doesn't work on the PinePhone: Pasting seems to cause Lomiri to crash)

        To copy certificat.pdf from ~/Documents/Dossier A to ~/Documents/Dossier B try the following in the Terminal app:

        ~$ cp ~/Documents/Dossier\ A/certificat.pdf ~/Documents/Dossier\ B 
        

        to move the file instead:

        ~$ mv ~/Documents/Dossier\ A/certificat.pdf ~/Documents/Dossier\ B 
        

        The issue here I think is the space in the folder name. This needs to be escaped. It can be done with the \ character, or by enclosing the folder name within double quotes. But in general use of spaces is discouraged in folder names, as it can be somewhat inconvenient on the command line. You could consider using underscores (_) instead.

        D 1 Reply Last reply Reply Quote 2
        • D
          domubpkm @arubislander last edited by

          @arubislander Currently tested on BQ E5 HD dev : ONLY double quotes work . I will test more tonight.
          Thank you.

          1 Reply Last reply Reply Quote 0
          • D
            domubpkm last edited by

            Not specifically to my problem, but confirmation that generally speaking, the cp and mv commands work well in the Pinephone! 🙂

            1 Reply Last reply Reply Quote 0
            • arubislander
              arubislander last edited by

              Command line tools that manipulate the filesystem will tend to work on any distribution. If you can pull up a terminal, the screen is legible and the (on screen) keyboard responds to what you type, then you are usually good to go.
              Only thing like missing packages or incorrectly configured permissions, will be able to foil you now and then. But those instances are rare.

              D 1 Reply Last reply Reply Quote 0
              • D
                domubpkm @arubislander last edited by

                @arubislander The usefulness of the cp and mv commands is that they can be currently being used as a workaround for a very annoying bug on the Pinephone : https://gitlab.com/ubports/community-ports/pinephone/-/issues/53

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post