pipe viewer does not copy the file when told to [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I am trying to use Pipe Viewer command like so:
pv -cN cp file.txt /home/user/Desktop/test/
For some reason it does not copy the file. When use cp without Pipe Viewer it works perfectly. What am I doing wrong?

You can't issue commands to pv like that. This is probably what you are looking for:
pv -c file.txt > /home/user/Desktop/test/file.txt
pv probably isn't the best tool in this case. You should use rsync with the --progress flag.
rsync --progress file.txt /home/user/Desktop/test/

Related

Renaming file with date using mv command [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 months ago.
Improve this question
How to change the filename from file.txt to renaming it to be file_may_20_2020.txt
using mv command?
I have used
mv file file_(`date`).txt
I still don't know how to put a command inside another command
Use either
mv file file_"`date +"%B_%d_%y"`".txt
or
mv file file_"$(date +"%B_%d_%y")".txt
mv file file_"$(date +"%B_%d_%y")".txt
What you put inside the $ is like a template string and its value is placed in the string

How to download an entire directory and locate using wget? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
i can download entire folder with following command:
wget -r --no-parent http://abc.tamu.edu/projects/tzivi/repository/revisions/2/raw/tzivi/
But how can i locate them for example into this folder: home/web/example
Try use key -P.
Please, note you may need to use command sudo.
wget -r --no-parent http://abc.tamu.edu/projects/tzivi/repository/revisions/2/raw/tzivi/ -P /home/web/example

Does zgrep unzip a file before searching? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
Does zgrep unzip a gzip file and make a temporary copy before searching or does it search directly on the compressed file?
This source of zgrep uncompresses the file with zcat and pipes the result to grep.
So, no, it does not use a temporary file, but yes, it decompresses (but not fully) before searching.

Error while trying to copy file to many files using cp [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
Error when running this command, i think the command is clear to get the idea.
cp file.txt /folder/*/*/*/file.txt
You need a loop to do that:
for dir in /folder/*/*/*/; do cp file.txt "$dir"; done

Linux rename command but for dynamic values [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have files on a Linux server for example:
2103acc.001.lob
2507acc.002.lob
2222acc.021.lob
1210acc.051.lob
I would like to change them to:
2103acc.pdf
2507acc.pdf
2222acc.pdf
1210acc.pdf
I cannot performo
rename .001.lob .pdf *.lob
because those are dynamics number
Can someone write me the solution?
Thanks
This regexp should remove digits followed by .lob and replace with .pdf:
rename -n -v 's/\.[0-9]+\.lob$/\.pdf/' *.lob
Once you're convinced you have the right pattern, just remove the -n (dry-run) and let it run properly:
rename -v 's/\.[0-9]+\.lob$/\.pdf/' *.lob
Ixer missed a * in his answer, so i added it:
rename -n -v 's/\.[0-9]*\.lob$/\.pdf/' *.lob

Resources