Tag Info

New answers tagged

4

You can't do this with cp alone, short f listing the files to copy. Making partial copies goes beyond cp's capabilities. Rsync is the obvious tool for the job and it's very widespread. If you only have POSIX tools, you can use pax. You can omit files by rewriting their path to an empty string. cd /home && pax -rw -pe ...


-1

How about cp !(my-folder) /foo Example: $ find . -type f ./my-folder/test4.txt ./my-folder/test3.txt ./test2.txt ./test1.txt $ echo cp !(my-folder) /foo cp test1.txt test2.txt /foo $


4

You can do it with find(1) and cpio(1): find /home -path './my-folder/test[34].txt' -prune -o \( -type f -print \) | \ cpio -pdamv /some/other/dir


10

X11 If using X11 (the most common GUI on traditional Unix or Linux based systems), to copy the content of a file to the X11 CLIPBOARD selection without displaying it, you can use the xclip or xsel utility. xclip -sel c < file Or: xsel -b < file To store the content of file as the CLIPBOARD X11 selection. Note that it should be stored using an ...


0

Maybe you wanted to ask this. But any file you want to read must be opened by some system call. If you don't have access to a file, you can't read it. That's the idea of restricted access.


1

cp outline.doc ../ ../: parent directory of the current directory, i.e. sample_dir


1

As I commented (and for obvious performance reasons) the kernel is using a page cache. So this is a feature, not a problem. See http://linuxatemyram.com/ for more. You could (but I don't recommend doing that) using some mount options (to disable, or lower the use of, the page cache), and you need to umount any device (e.g. an USB key) before unpluggging or ...


2

It is by design that the kernel tells userspace utilities that a file operation completed successfully while the caches are buffered. Try editing /etc/hdparm.conf to disable write caching with the option write_cache = off. However this will reduce performance, and it is usually preferred to use sync if you want to ensure write buffers are flushed to disk.


2

You may use the wget utility. It has a really simple syntax, and all what do you need is to: wget http://link.to.file and it will be stored in the same directory where do you run wget. If you'd like to store a downloaded file somewhere else, you may use -P option, e.g. wget -P /path/to/store http://link.to.file


3

Of course, use scp. It behaves roughly like cp. Sample: scp username@hostname:/remote/path/to/file local_path You can recursively copy directories with -r That's if you really need to download it via ssh. If they provide you just with an url (your question wasn't clear), then wget or curl will do the job, no need for ssh.


2

Use ssh to login to your server, then use for example wget to download the file wget https://provided_link


1

This read error is likely a problem with the DVD. Consider using ddrescue which can read past the error. Remember that the error will remain as zero's in the copied image.


1

FTP? #!/bin/sh # ftp://ftp.eso.org/pub/qfits/ HOST='ftp.eso.org' USER='anonymous' PASSWD='<your.email.address>' ftp -n $HOST <<EOF quote USER $USER quote PASS $PASSWD prompt off cd /pub/qfits ls mget * quit EOF exit 0


3

you can use something like cd directory-where-you-want-to-put-the-files wget -r ftp://ftp.eso.org/pub/qfits/


0

A reasonable way is to run an ssh server on your phone. This does require your phone to be on the net, however. That is what I am currently doing, but only to copy files from my android phone to my computer. The SSH implementation I am using is SimpleSSHD. The instructions on that site should suffice for you to run SimpleSSHD on your phone. It is also on ...


1

gphoto2://… is a URL, not a file name. Most programs expect file names, not URLs. In order to access a file, it needs to be on a mounted filesystem. Android devices normally expose their filesystem via MTP. There are a couple of filesystems over MTP; see the Arch Wiki for some pointers. Look if your distribution has one of them packaged. Alternatively, if ...



Top 50 recent answers are included