Are my files losts after I executed mv /parentdir/otherparentdir/somedir/* /parentdir/destdir/?

I was trying to move all the files in a dir to another dir. I got errors at the first 2 attempts but at 3rd attempt it appeared the command did succeed. However the source dir is now empty but the files are not at the dest directory. Are they gone or is there a way I can recover them?

Here are the commands I executed (Downloads is at /DataVolume/shares/Public dir):

$   cd /DataVolume/shares/Public $   shopt -s dotglob $   mv -i Downloads/* /DataVolume/shares/Ricardo/Downloads mv: target `/DataVolume/shares/Ricardo/Downloads' is not a directory $   mv -i Downloads/* /DataVolume/shares/Ricardo/Downloads/ mv: target `/DataVolume/shares/Ricardo/Downloads/' is not a directory $   mv -i Downloads/* /DataVolume/shares/Ricardo/ 

After executing the last command I looked into /DataVolume/shares/Ricardo/ but the files are not there. Then I went to look at /DataVolume/shares/Public/Downloads and it’s now empty.

UPDATE If I execute the command /DataVolume/shares/Ricardo/ i get this

$   ll /DataVolume/shares/Ricardo/ total 11252 drwxrwxr-x  5 root     share      32768 Feb 13  2016 zzzzzz ADirectory drwxrwxr-x  2 root     share       4096 Feb 12  2016 rrrrrr ADirectory -rw-rwxr-x  1 root     share    5741378 Feb 12  2016 xxxxx.dmg drwxrwxrwx 15 www-data www-data    4096 May 16  2018 Documents drwxrwsr-x  8 ricardo  share       4096 Feb 26  2017 DocumentsOld -rw-rwxr-x  1 root     share    3514909 Feb 12  2016 yyyyyy.dmg drwxrwsr-x  7 ricardo  share       4096 Jan 29  2016 OtherDir2 drwxrwxr-x  3 ricardo  share       4096 May 16  2018 OtherDir drwxrwsr-x  2 ricardo  share       4096 Sep 30  2015 Other Dir3 -rw-rwxr-x  1 root     share    2188642 Feb 12  2016 zzzzz.tar.tar.gz 

One thing I can notice is the datetime for . in /DataVolume/shares/Ricardo/ is the same that the the datetime for /DataVolume/shares/Public/Downloads

/DataVolume/shares/Ricardo$   ls -hal drwxrwx---+ 10 root     share    4.0K Sep 22 09:23 . drwxrwxr-x  11 root     share    4.0K Sep 22 09:06 .. ... 
/DataVolume/shares/Public$   ls -hal ... drwxrwxr-x   2 root    share 4.0K Sep 22 09:23 Downloads ... 

How are files in file container (posibly in archive file) encrypted?

I see advantage of using container in it that offer work with more files rather than with one but is there some advantage in encryption technique?I would like to know if it encrypt each single file in a container (or an archive) or is there some another technique used to encrypt it?I want create my own file container as a school project and add some features like encryption etc. therefore i would like to gain more complex overview firstly.

Download a list of files with wget using wildcards

I have a list of files like:

test.com/image01.png test.com/image02.png test.com/image03.png ... test.com/image50.png 

and want to download them all. One way is to write all names in a file and then:

$   wget -i url.txt 

But for 50 links (at least), it’s a little to long to write all in a file (even by copy and pasting, I have to edit one line 49 times.)

I tested something like:

$   wget test.com/image[01-50].png Warning: wildcards not supported in HTTP. --2019-09-22 01:45:43--  test.com/image[01-50].png Resolving test.com (test.com)... 12.12.12.12 Connecting to test.com (test.com)|12.12.12.12|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2019-09-22 01:45:43 ERROR 404: Not Found. 

How can I use wildcards in wget? Should I use any switches?

Purge Guake with config files: Preference files survive somewhere

I need to completely remove Guake. It seems to have some bug that I triggered while setting keybindings. Now the “close tab” keybinding does not work anymore. I tried

$   sudo apt-get purge guake $   sudo apt-get purge --auto-remove guake 

and different variantions of these. When I reinstall Guake, my old preferences are still there: Keybindings, color scheme etc. I can’t locate where the preference files are located though. How can I remove Guake entirely together with the somehow broken preference files?

Combing five files with same content but different names into one file with versions in sp2019

I am working with SP2019 and On the file share, there is a Legal folder added which gets lot of files dumped into it. Once users work on files, they save it there and send it to external party for review, this file as an example be named as ‘General Accounting Assessment’ and post review it comes back as ‘General Accounting Assessment_V1’ and sits on the same shared folder as the original file.

This review process happen multiple times and that results into 4-5 files on the file share with below names: 1. ‘General Accounting Assessment’ 2. ‘General Accounting Assessment_v1’ 3. ‘General Accounting Assessment_v3’ 4. ‘General Accounting Assessment_v4’

Users initially save file ‘General Accounting Assessment’to SharePoint prior to sending out for review to external party so when v1, v2,v3 and v4 version file arrives, they manually rename the files to match it to name ‘General Accounting Assessment’ and drop into SharePoint so it can add up as a new version to the existing file.

I would like to automate this process and for which I am wondering if there is a way maybe by Flow or SharePoint to check whenever a new file is added, strip off the portion _v1 or _v2 or _v3 or _v4 dynamically appended at the end to file name ‘General Accounting Assessment’ and save it to SharePoint

Can someone please help on the proposed solution, thanks in advance.

Sharepoint online/365 integration (Upload files) on React app hosted on Azure and WebApi C# .Net Core 2.2

I’m struggling since some weeks ago trying to interact/automate a way to upload files from a Web App created in React and upload files to a Sharepoint Online Site – in a specific folder. The WebApp is hosted in Azure and using a C# .Net Core 2.2 as backend.

I’m trying to using some kind of REST API that help me out with this task (Could be on React in frontend, or in C# Core or C# MS FW .Net for backend) I’m searching across internet a way to do it but all the testings were failed.

Someone can give me some insight, tip or advice on how to achieve this?

I’m trying:

  • Use code from Microsoft WebPage (Using jQuery).

  • Using PnP, but on my localhost I receive a CORS problem (I’m trying using Client ID and Secret ID to interact with Sharepoint).

Raid recipe in seed files

I have the following hardware setup:

3×8 disks combined in a hardware raid, so the system sees

  • /dev/sda
  • /dev/sdb
  • /dev/sdc

Each of these logical volumes is 6.4 TB in size.

I’m trying to create a seedfile that’s able to install this system automatically.

What I want is for the root partition to use all of /dev/sda and /dev/sdb and /dev/sdc on another mountpoint called /var/local using a striped array of /dev/sdb and /dev/sdc

(I know this is less than ideal, but due to a variety of reasons, this might be the only workable solution for now)

Unfortunately, I found the documentation to be quite lacking. This is what I’ve came up with.

### partitioning ##################################################### d-i partman-auto/disk string /dev/sda /dev/sdb /dev/sdc   #d-i partman-auto/choose_recipe select atomic # <raidtype> <devcount> <sparecount> <fstype> <mountpoint> <devices> <sparedevices>  d-i partman-auto-raid/recipe string \         0 2 0 ext4 /var/spool/ras   /dev/sda3#/dev/sdb3 .  d-i partman-auto/expert_recipe string                         \     root ::                                                   \          32768 32768 32768 linux-swap                         \                   $  primary{ } method{ swap } format{ }        \          .                                                    \          200000 300000 -1 ext4                                \                   $  primary{ }                                 \                   method{ format } format{ }                  \                   use_filesystem{ } filesystem{ ext4 }        \                   mountpoint{ / }                             \         .                                                     \                                                               \     multiraid ::                                              \                 .                                             \                 100000 300000 -1 ext4                         \                         method{ raid }                        \                 .                                             \ 

Unfortunately, I have to do this pretty much blind, as I do not have a system for testing available. I’ve copied the number in /dev/sda3 from another example – I also do not know whether this is correct. I’m also not sure about the exact difference between the auto-raid string and the expert recipe string. Some pointers in the right direction would be very welcome.

How to fix the error using fgets (Invalid file identifier) to load files in Matlab

I want to parse the .txt files with my m-file, but I am confronted with the fgets error.

My m-file contents:

function ROIs = loadROIfiles(ROIfileName) % Loads all the ROIs stored in the *.txt file from the specified location. % The ROIs are returned as a structure array as: % ROIs(i).spacing_x (double) % ROIs(i).spacing_y (double) % ROIs(i).label (string) % ROIs(i).slice_number (double) % ROIs(i).xValues (vector of double) % ROIs(i).yValues (vector of double) % % USAGE : % ROIs = loadROIfiles(ROIfileName) % % % @author University & University Hospitals of Geneva (HUG) MedGIFT Group %         Adrien Depeursinge adrien.depeursinge@hevs.ch % %      Copyright (C) 2012, MedGIFT group at University Hospitals of Geneva %        %      This program is free software; you can redistribute it and/or modify %      it under the terms of the GNU General Public License as published by %      the Free Software Foundation; either version 2 of the License, or %      (at your option) any later version. % %      This program is distributed in the hope that it will be useful, %      but WITHOUT ANY WARRANTY; without even the implied warranty of %      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the %      GNU General Public License for more details. % %      You should have received a copy of the GNU General Public License %      along with this program; if not, write to the Free Software %      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  %  fid = fopen(ROIfileName, 'r'); i=1; while 1     tline = fgetl(fid);     if ~ischar(tline), break, end      if (isempty(findstr(tline, 'SpacingX:')) == false)         spacing_x = str2double(strrep(tline, 'SpacingX: ', ''));     elseif (isempty(findstr(tline, 'SpacingY:')) == false)         spacing_y = str2double(strrep(tline, 'SpacingY: ', ''));     elseif (isempty(findstr(tline, 'label:')) == false)         label = strrep(tline, 'label: ', '');     elseif (isempty(findstr(tline, 'slice_number:')) == false)         slice_number = str2double(strrep(tline, 'slice_number: ', ''));     elseif (isempty(findstr(tline, 'nb_points_on_contour:')) == false)         nb_points_on_contour = str2double(strrep(tline, 'nb_points_on_contour: ', ''));         xValues = [];         yValues = [];         for j=1:nb_points_on_contour             tline = fgetl(fid);             [xValStr, yValStr] = strtok(tline, ' ');             xVal = str2double(xValStr);             yVal = str2double(yValStr);             xValues = [xValues xVal];             yValues = [yValues yVal];         end         % store the ROI into the struct array "ROIs"         ROIs(i).spacing_x = spacing_x;         ROIs(i).spacing_y = spacing_y;         ROIs(i).label = label;         ROIs(i).slice_number = slice_number;         ROIs(i).xValues = xValues;         ROIs(i).yValues = yValues;          i=i+1;     end end  fclose(fid); 

Code in command window:

ROIs = loadROIfiles('CT-INSPIRIUM-6817.txt') 

Errors:

Error using fgets Invalid file identifier. Use fopen to generate a valid file identifier.  Error in fgetl (line 32) [tline,lt] = fgets(fid);  Error in loadROIfiles (line 38)     tline = fgetl(fid); 

By the way, I am not sure whether this is due to the online Matlab, but not the desktop version, which I am using. Thanks in advance for all suggestions!

Merging individual files from two folders sequentially (never asked question)

I need to merge the contents of two folders sequentially into individual destinations. Here is what i have. A,B,C,D,E,F are individual files.

Folder 1: A B C ...  Folder 2: D E F ... 

At the output i need merged files sequentially. So they should be merged like this:

Output: AD BE CF ... 

In other words, first file from the Folder 1 with the first file from the Folder 2. Second file from the Folder 1 with the second file from the Folder 2. In our case AD is consisting of the content of files A and D, BE consisting of files B and E, etc.

Both folders have the same number of files. Output can go anywhere. For the sake of simplicity let’s call it Output folder and locate it in the same root as Folder 1 and 2.

Been looking for the solution for two days now. Yikes!