WinSCP: Is it possible to prevent folder of certain name from being uploaded? - npm

I often use NPM and the node_modules folder contains thousands upon thousands of sub directories. Even though they are small, remote file transfers of this many files or directories takes hours to write so many files.
Many times I am deploying a whole directory and don't realize that there is a node_modules that I have not manually deleted somewhere deep in the tree structure.
Is it possible to ignore folders of a certain name or alert me if uploading a certain folder?
In git I can just ignore it with **/node_modules, but I don't know of an equivalent for FTP transfers.

Related

Suggestions to backup

I use git to keep track of certain directories modifications, and to avoid file duplication or file inconsistencies. For backup, I store these directories on Github. Now, these directories are over 1GB, and I am thinking of taking them out of Github, but I don't know what is the best way to back up these files and still keep track of file duplication or file inconsistency.
I thought of creating a git server where I store all my repos. I thought of using complex scripts for rsync, or even using borg.
Do you have any suggestions?

Too many files in `.snakemake` folder

I am running snakemake with a lot of files and rules. As a consequence the .snakemake folder contains ~500,000 files.
This is kind of problematic for me as we have a quota on the number of files on the working folders.
Is there a way or plans to reduce the number of files in the .snakemake folder?
Thanks,
Jan

What directories inside the IntelliJ config directory can safely be excluded from backups?

I create daily incremental backups of my home dir and I noticed that each snapshot contains a lot of new files that come from .IntelliJIdea2016.2/ which is the config directory of IntelliJ Idea.
I already excluded .IntelliJIdea2016.2/system/caches/* but there is a lot more coming from other sub-directories of .IntelliJIdea2016.2.
Does anyone know which sub-directories beside caches/ are save for exclusion?

Is it safe to delete the stage directory?

One of my servers is running out of capacity, mostly due to WebLogic's stage folder. I've been looking for information and it seems to be a temporal folder, but unlike older versions, on WL11g this folder is out of the tmp folder. So I'm not sure whether or not I can safely remove it.
Stage directory is where weblogic copies all the applications that it needs to deploy on to the managed servers. Wls does not delete any file from this folder. So in the long run if you have done deployment of many versions of your application then this folder can become rather large.
So yes you can delete the contents of this folder. At the time of restart wls will copy all the necessary files to this folder (this could take some time).
yes, you can delete the stage. All the necessary applications details will be there in this directory, but any how if it is a large environment(many applications are running), just take the back up of the directory or rename it and then you can safely delete the stage.

jars, external properties, and external file io

I checked quite a few similar questions, but so far I am unsatisfied with the solutions.
Ever use the Minecraft Server? At initial launch, it creates all the files and folders it needs, and allows you to make changes to files like Server.properties and ops.txt by making them external of the executable jar file.
I'm working on a similar project, and I want to duplicate that behavior. Everything works great when I run it in eclipse. When I export to a jar file though, things get funky. The external files and folders are created without a hitch, but afterword, it would appear as though they cannot be read from or written to. Any ideas how Notch made his server?
--edit--
Scratch that, it doesn't even appear to reliably create the files and folders. Maybe it only creates them the very first run after creation?
--edit again--
It creates them in the root directory. When I tested it in eclipse, the root directory was limited to the folder containing the project, and therefore looked fine. The solution was to make the class aware of it's location, and include it in all file operations.
Have the main class in your executable jar file look up where it is, then have it store that information in a global String or something. Prefix your filenames with that string in your file operations, and voila! It's writing to the correct directory.