Sponsored Content
Full Discussion: cp modification
Top Forums UNIX for Beginners Questions & Answers cp modification Post 303024096 by vbe on Saturday 29th of September 2018 01:25:53 PM
Old 09-29-2018
*nix isnt windows... windows creates a "copy" file only macosX offers something similar since it downloads you dont know why sometimes files you only downloaded but just wanted to look at ( often PDF files...) adding (X) to the file name and incrementing X.

To my knowledge no modern unix would accept that you cp a file on itself, allowing it would end with a file size 0, so you must give second parameter and it should be at least an existing directory ( file is optional if keeping the same name )

Your only choice if you dont want to give a second parameter because the file will be in the same directory is to write a script where you use the the first param for the second adding an extension to the original file name
 

10 More Discussions You Might Find Interesting

1. IP Networking

ifconfig modification

Hi all,,i have problem with my homework form my lecture.. He is give me a homework to create: ifconfig eth0 0.255.255.255 1.1.168.192 my lecture says, i can making the shell scripting to finish my homework.. i have question, can setting ifconfig like in the upper? (1 Reply)
Discussion started by: demhyt
1 Replies

2. Shell Programming and Scripting

Need a modification on this script

Hi All I have files contains rows which look like this: 2 20090721_16:58:47.173 JSUD2 JD1M1 20 IAM 966591835270 249918113182 b 3610 ACM b 3614 ACM b 3713 CPG b 3717 CPG f 5799 REL b 5815 RLC b 5817 RLC :COMMA: NCI=00,FCI=6101,CPC=0A,TMR=00,OFI=00,USI: :COMMB: BCI=1234: :RELCAUSE:10: ... (1 Reply)
Discussion started by: zanetti321
1 Replies

3. UNIX for Advanced & Expert Users

.bash_history modification

Hi Experts, I know my question would be strange but i need to understand how the .bash_history file is logging user actions (the mechanism) and if possible modify it to include also the date/time of every action done by the user. Sample file: # more .bash_history ssh <IP address> -l axadmin... (3 Replies)
Discussion started by: Dendany83
3 Replies

4. Shell Programming and Scripting

Help with file modification

Hi, I have a file test.txt . The contain of the file is as below : 365798~SAPUS~PR5~0000799005~ADM CHARG MEDCAL INS~~~~~~~~~~~~~~~~~~~~~~~~SLAC480 I want to modify this file. And file contain loking like "365798"~"SAPUS"~"PR5"~"0000799005"~"ADM CHARG MEDCAL... (6 Replies)
Discussion started by: mnmonu
6 Replies

5. Shell Programming and Scripting

Help for File Modification

Hi, I have a file abcd.txt. cat abcd.txt output is as follows : "aa"~"bb"~"001"~""~""~"cc" "dd"~"005"~"" ~""~"kk"~"aa"~"00 8"~""~""~ I want the output looking like: cat abcd.txt "aa"~"bb"~"001"~""~""~ "cc""dd"~"005"~""~""~ "kk"~"aa"~"008"~""~""~ I have a script. (4 Replies)
Discussion started by: mnmonu
4 Replies

6. Shell Programming and Scripting

Help for File Modification

Hi All, I have a file disk_space.log. cat disk_space.log 94% / 32% /boot 38% /mnt/data 100% /media/CDROM I want the output, like cat disk_space.log 94% / 100% /media/CDROM That means print the line those are grater-than 90%. And rest of the line is remove from file. I have a... (2 Replies)
Discussion started by: mnmonu
2 Replies

7. Shell Programming and Scripting

File Modification

Hi, I have a file input.txt. cat input.txt output is as follows : Code: "0001"~"name"~"bb"~"20.25"~""~""~"0002"~"name" "dd"~"35.50"~"" ~""~"0003"~"name"~"aa"~"21.3 5"~""~""~ I want the output looking like: cat output.txt Code: "0001"~"name"~"bb"~"20.25"~""~""~... (6 Replies)
Discussion started by: mnmonu
6 Replies

8. Shell Programming and Scripting

Help For File modification

Hi, I have a file. File contains are as follows : Feb 19, 2012 5:05:00 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Feb 19, 2012 5:05:00 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 771 ms Feb 20, 2012... (3 Replies)
Discussion started by: mnmonu
3 Replies

9. Shell Programming and Scripting

Awk modification

I need help modifying the code below. DATAFILE is a log file. I have two strings i need to search for in the log file. The two strings are: 1. ERROR 2. com.rolander.promotions.client awk 'BEGIN { while((getline < "'${SFILE}'")>0) S FS="\n"; RS="\n" } (11 Replies)
Discussion started by: SkySmart
11 Replies

10. Shell Programming and Scripting

help in modification of code

I have below code, i want to run this code, but this below code should run on myblocka myblockb myblockcc myblockxx myblockanything but it will not run on "myblock" for BLOCK in /sys/block/myblock* do echo "100000" > "$BLOCK"/abcd done (7 Replies)
Discussion started by: learnbash
7 Replies
LHAPDF-GETDATA(1)						   User Commands						 LHAPDF-GETDATA(1)

NAME
lhapdf-getdata - Get PDF sets from the LHAPDF repository SYNOPSIS
lhapdf-getdata [--main] [--all] [--repo=URL] [--dest=DEST] [--dryrun] <name|number> [<name|number> ...] DESCRIPTION
Grab PDF grid and param files from the LHAPDF repository and install them into the local LHAPDF data directory. OPTIONS
-h, --help show this help message and exit --repo=URL Base URL of online sets repository (http://www.hepforge.org/archive/lhapdf/pdfsets/current) --dest=DEST PDF sets directory to install to (/usr/share/lhapdf/PDFsets) --all Get ALL sets (this will be hundreds of megabytes... be careful!) --list Just list available files --force Overwrite existing files --dryrun Don't actually do any downloading -Q, --quiet Suppress normal messages -V, --verbose Add extra debug messages EXAMPLES
Show all available sets: lhapdf-getdata --list Get all NNPDF PDFs with pattern matching: lhapdf-getdata NNPDF Get CTEQ6L1, CTEQ66, MRST-S LO* and LO** PDFs with pattern matching: lhapdf-getdata CTEQ6ll CTEQ66 lomod MCal Get MSTW2008 68% confidence PDF by full name: lhapdf-getdata MSTW2008lo68cl.LHgrid See how much downloading would be involved in getting all PDF sets: lhapdf-getdata --all --dryrun I'm hardcore, give me the whole collection: lhapdf-getdata --all AUTHOR
This manual page was written by Lifeng Sun <lifongsun@gmail.com> for the Debian system (but may be used by others). lhapdf-getdata May 2011 LHAPDF-GETDATA(1)
All times are GMT -4. The time now is 01:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy