rpm – How do I properly create new directories if they don’t exist, and then copy files into them on the target install device?

I’m trying to accomplish the following steps with the below rpm code:

  1. Copy files into an rpm package from device A (host server or development server) using rpmbuild -ba foo.spec
  2. The rpm package is built and manually transferred/downloaded to the root folder of the target: device B
  3. Install the rpm package on device B using: rpm -i test.rpm
  4. A directory is created /usr/local/etc/NS/enrich/*…etc during the install by the rpm package on device B
  5. The files (source1 through source 4) are then copied into the respective directory on device B.

My code currently does not do this, but I don’t understand why.

Name:       test
Version:    0.1
Release:    0
Summary:    This RPM is for transfering foo lists to a Test device.
License:    TODO
Source0: foo_foov4.csv
Source1: foo_foov6.csv
Source2: foos_approved.csv
Source3: s_all_foos_enriched.csv
Source4: s_foo_foobar.csv

Test Build 0.1

#copy the files
cp -p %{SOURCE0} .
cp -p %{SOURCE1} .
cp -p %{SOURCE2} .
cp -p %{SOURCE3} .
cp -p %{SOURCE4} .

%{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/%{name}/usr/local/etc/NS/enrich/foo_Approve/csv/
%{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/%{name}/usr/local/etc/NS/enrich/foo_/csv/
%{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/%{name}/usr/local/etc/NS/enrich/foobar_WildApprove/csv/
%{__mkdir} -p $RPM_BUILD_ROOT%{_datadir}/%{name}/usr/local/etc/NS/enrich/foobar_Wild/csv/

%{__install} -m 644 -p foo_foov4.csv 
%{__install} -m 644 -p foo_foov6.csv 
%{__install} -m 644 -p foos_approved.csv 
%{__install} -m 644 -p s_all_foos_enriched.csv 
%{__install} -m 644 -p s_foo_foobar.csv 

sharepoint online – Copy custom list items from one list to another using CSOM

I found the following code from https://www.sharepointsky.com/sharepoint-online-copy-items-from-one-list-to-another-list-using-csom-net-managed-object-model-code/ to copy custom list items from one list to another:-

public static void CopyItemsFromOneListToAnotherList()

using (ClientContext ctx = new ClientContext(“https://onlysharepoint2013.sharepoint.com/sites/Bhawana/”))
ctx.AuthenticationMode = ClientAuthenticationMode.Default;
ctx.Credentials = new SharePointOnlineCredentials(GetSPOAccountName(), GetSPOSecureStringPassword());

List sourceList= ctx.Web.Lists.GetByTitle(“SourceList”);

List destList = ctx.Web.Lists.GetByTitle(“DestinationList”);
CamlQuery camlQuery = new CamlQuery();
camlQuery.ViewXml = “<View/>”;
ListItemCollection listItems = sourceList.GetItems(camlQuery);


foreach (ListItem item in listItems)
ListItemCreationInformation newItemInfo = new ListItemCreationInformation();
ListItem newItem = destList.AddItem(newItemInfo);
newItem(“Title”) = item(“Title”);
newItem(“EmailID”) = item(“EmailID”);
newItem(“Address”) = item(“Address”);

but i am not sure how i need to modify the CSOM code to copy the item versions as well?

I will do very good work in design, data entry and copy paste in a very short time. for $10

I will do very good work in design, data entry and copy paste in a very short time.

I designed this gig for clients like you who need long term committed services. I provide high-quality virtual assistant services beyond data entry, data mining, web research and copy-paste.

When you hire me, you will benefit from my years of experience!

Here are the services I offer:

Data Entry, Copy Paste, Data Mining, & Web Scraping

Spreadsheet Creation/Document Updating

PowerPoint Presentation

Linkedin & Instagram Management

Graphics Design/Photoshop Work

Lead Prospecting & Lead Generation

Real Estate Skip Tracing and Databasing

Property Listing/Management of Listings

CRM Handling/Project Management

Website Management/WordPress/WooCommerce/Plugin Setup

I am offering a special discounted price of $5 per hour for the first few clients.


clipboard – Making Ctrl+C copy text in gnome-terminal?

Apart from what @Dan said, there’s another option for copy-pasting text in Linux which I’m finding much faster and easier to use, since there’s no need to swich from mouse (which you’re using to make the selection) to keyboard:

  • selecting text with mouse copies it to clipboard
  • middle-click pastes it.

This feature is especially useful in terminal, for example when assembling a command from bits of text which are already on screen.

This works in all applications, so it’s possible to copy-paste text from a web page to terminal etc.

The clipboard buffer used for middle-click copy-paste is separate from the one used for Ctrl-C/Ctrl-V, which makes possible to have two different bits of text copied at the same time.

How do I copy a Google search URL in iOS Safari?

I’m writing a Stack Exchange answer from my iPhone, and I want to include a Google search URL. How can I copy the URL of the search results from iOS Safari? Going up to the address bar and tapping “Copy” only grabs the search terms, not the full URL. I’m using iOS 13.4.1.

Note: My question is very similar to this one, except that question is asking about the desktop version of Safari, not iOS.

Google Sheets script Filter copy and paste with format

I am looking for help to create a filter on a Google Sheets Script.
I want the following:
• I have a database Schedule which has table with information that I want to filter
• Once the database A is updated I want to filter Colum b row 8 and only take the cells that have information and are filled with words, numbers, etc.
• After that I want to copy the data filtered and paste on a new Sheet Data “Foreman on specific columns
• Also I want to copy and paste the format such as color, size, etc.
• I have the following code which it does the partial job but I cannot figure it out to only get the specific data needed

function Foreman(){
var ss = SpreadsheetApp.getActiveSpreadsheet();
var scheduleCCC_sheet = ss.getSheetByName(“Schedule”);
var Foreman_sheet = ss.getSheetByName(“Foreman”);
var pasteforemans = Foreman_sheet.getRange(8,2);
var originalData = scheduleCCC_sheet.getRange(9,2,scheduleCCC_sheet.getLastRow()1,11).getValues();
var filter1 =””;
var data = originalData.filter(filterlogic);



var filterlogic = function(item){
if(item(1) == “”){
return false;
}else {
return true;

Linux Terminal – Copy All Directories with JS or TS files, setting a max depth of each item being copied

I have hundreds of directories, each with one or more .js or .ts files in them but also other files. Many of them are nested multiple levels deep. What I am trying to do is copy each sub directory to a new directory with the directory contents, but only with the .js or .ts files in them.

Here is what I have so far:

find "." -path "*node_modules*" -prune -o -type f ( -iname *.ts -o -iname *.js ) -printf "%h" | sort -uz | xargs -0 -I _ cp -a _ "/c/test/"

What this is currently doing is copying all directories (excluding the node_modules directories) of file type .ts or .js, and copying them to the /c/test/ directory. However, the problem I am having is that for each directory, it is copying ALL the files AND all the subdirectories when I only want it to copy the .ts or .js files located within that directory. And here is the most important part, for every directory it copies, no matter how deep or shallow that directory is, I only want it to copy that directory. I don’t want to copy a directory with all of the subdirectories located in it. However, I want to copy every sub directory directory no matter how deeply nested it is. Hopefully this makes sense.

Imagine my directory structure is your dresser. Inside each drawer are several other drawers. Some of the drawers have items inside but also other drawers. One could simply empty all the items on the floor, but that’s not what I want to do. I want to empty all the DRAWERS on the floor, keeping the items inside, but no drawer should contain another drawer. But the end result is every single drawer that has items is on the floor.

In other words, the end result should be a /test directory with a bunch of copied directories inside, but each of those directories has NO sub directories inside of them. They should only have js or ts files inside. I hope this makes sense.

HOW I MAKE $22 IN A DAY WITH A NEW SYSTEM – GET FREE PDF COPY – Other Money Making Opportunities

$22 Per Day.JPG



Hello Guys, this is to show you a new system have just discovered about 48hrs ago which fetched me $22 per day although the business promises about $85 per day but, I was able to make just $22 for the first time so, kindly click this link https://bit.ly/2yxcMBu   to get your pdf free copy now or copy and paste this link  https://bit.ly/2yxcMBu  into your web browser, you don’t need to spend a dime to get started as you will access everything free of charge…


Windows Photos App “Save” instead of “Save a copy” as the default

Every time I wish to save a photo instead of creating a new file for the edits I just made, I have to click on the arrow which gives the “Save” option instead of the “Save a copy” option.

enter image description here

How do I make the “Save” option as a default so that I can avoid clicking the arrow every single time and perhaps save myself some time as it helps if you edit many photos at once.

sharepoint online – How to copy item attachment to another item through Rest api or JSOM?

The following code for your reference. Tested the code. its working

<script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></script>
<script type="text/javascript">
var url = _spPageContextInfo.webAbsoluteUrl;
var listName="CL1120";
var sourceItemId=1;
var targetItemId=2;

function getAttachments() {   
    var requestUri = url + "/_api/web/lists/getbytitle('" + listName + "')/items(" + sourceItemId + ")/AttachmentFiles";
    // execute AJAX request
    return $.ajax({
        url: requestUri,
        type: "GET",
        headers: { "ACCEPT": "application/json;odata=verbose" }       
function copyAttachments(){
            //var fileUrl=item.ServerRelativeUrl;
            var targetFileName=item.FileName;
            var sourceSiteUrlList = url + "/_api/web/lists/getbytitle('" + listName + "')/items("+sourceItemId+")/AttachmentFiles/getbyfilename('" + targetFileName + "')";
            var targetSiteUrl = url + "/_api/lists/GetByTitle('" + listName + "')/items(" + targetItemId + ")/AttachmentFiles/add(FileName='" + targetFileName + "')";
            var xhr = new XMLHttpRequest();
            xhr.open('GET', sourceSiteUrlList, true);
            xhr.setRequestHeader('binaryStringResponseBody', 'true');
            xhr.responseType = 'arraybuffer';
            xhr.onload = function (e) {
                if (this.status == 200) {
                    var arrayBuffer = this.response;
                        url: targetSiteUrl,
                        method: 'POST',
                        data: arrayBuffer,
                        processData: false,
                        headers: { 'binaryStringRequestBody': 'true', 'Accept': 'application/json;odata=verbose;charset=utf-8', 'X-RequestDigest':  $('#__REQUESTDIGEST').val() }
                    }).done(function (postData) {
                            console.log('we did it!');
                    }).fail(function (jqXHR, errorText) {
    <input type="button" onclick="copyAttachments()" value="Copy Attachments"></input>