Results 1 to 4 of 4

Thread: how do i tell if the directory contains the file I just copied to ?

  1. #1
    Join Date
    Feb 2010
    Beans
    18

    how do i tell if the directory contains the file I just copied to ?

    Hi,

    Can someone tell me what commands to use to tell if the directory I have copied to contains the file ? cos when I use ls it shows nothing...

    Here's the command that I used to copy the file:

    root@DESKTOP-SB41UI7:~# cp space "/mnt/c/Users/karen/Udacity And SUSSE Cloud Native"/AWS-Jenkin-Practice/jenkins-master.pem.txt/to/Users/root/jenkins-master.pem" ~/ssh/

  2. #2
    Join Date
    Mar 2011
    Location
    U.K.
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: how do i tell if the directory contains the file I just copied to ?

    quotations not matched in pairs (one appears to be missing/not matched)
    also introduce space between " and /

  3. #3
    Join Date
    Jun 2014
    Beans
    6,269

    Re: how do i tell if the directory contains the file I just copied to ?

    In addition to the missing matched quote, you don't seem to have a space between the source and destination. THe command you posted shows you are trying to copy a file with the name: Udacity And SUSSE Cloud Native to another directory. The destination path contains a directory named "to" above the Users directory. Is that correct? Is this using windows sub-system for Linux?

  4. #4
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    6,008
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: how do i tell if the directory contains the file I just copied to ?

    As noted above, there appear to be some errors in your command. But you can indeed use ls to see if it was copied. If the name starts with a dot, the file is hidden and you have to use ls with the -a option. If the copy was unsuccessful, cp will give an error message. If there's no error message and the file doesn't appear to be there, either you copied it to the wrong place or you checked for its presence in the wrong place.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •