How to stop ".DS_store" file creation why its create [duplicate] - macos

This question already has answers here:
How to stop creating .DS_Store on Mac? [closed]
(8 answers)
Closed 8 years ago.
In my computer each folder has .DS_store file. If I delete it after several days its automatically creates .DS_store file. How do I stop it.

Open Terminal.
Execute this command:
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
Either restart the computer or log out and back in to the user account.
for more informations:
https://support.apple.com/en-us/HT208209

I don't believe you can- DS_Store is generated every time a folder is accessed in the Finder. So, if you really don't want it (or need to get rid of it for an archive or something similar), delete it using the command prompt and don't access the folder again with the Finder.

Related

Run batch file located in sub directory with another batch file [duplicate]

This question already has answers here:
Get current batchfile directory
(4 answers)
Closed 1 year ago.
So I know you think I should do something like: start C:\parentfolder\subfolder\batchfile.bat
or something along those but I was wonder if there was like a way to reference the sub directory without using it's actual name? Since the batch files will be generated by another batch file.
Don't ask why I need it to be generated I'd much rather it not but couldn't find any other way.
You have to cd into a subdirectory and then run start start.bat. That should run another batch file. To go into a relative subdirectory, run the command cd foldername. You have to make sure you are currently in the parent directory.

Get path to the user home directory on Windows in PowerShell? [duplicate]

This question already has answers here:
Getting home directory?
(2 answers)
Closed 2 years ago.
I am trying to get the path to the current user's home directory (e.g. C:\Users\User1) while respecting different localizations of Windows (which have a different name for the Users folder).
I have seen solutions in Batch, but isn't there a clean way of doing it in PowerShell?
Use the environment variable $env:USERPROFILE.
For example:
cd "$env:USERPROFILE\Downloads"
will take you to the user's Downloads folder (given that it's named "Downloads").]

Possibly corrupted ~.bash_profile [duplicate]

This question already has an answer here:
How to restore .bash_profile on a mac? None of my unix terminal are working [closed]
(1 answer)
Closed 3 years ago.
I will try to outline this as best I can because I know other people have had a version of this problem.
I received a routine update to Conda last week, which asked me to change the path for my environments. New to development and not knowing better, I was able to eventually access my ~.bash_profile and find that multiple installs of Anaconda had written multiple sets of system instructions. Again, not knowing any better, I wiped my profile and replaced it with Anaconda’s preferred path route.
Amazingly, Conda is about the one thing that is now working. I can activate my environments and run most of my Python commands, but none of my normal Terminal commands are working. I have tried solutions posted here including vi ~/.bash_profile, nano and echoing the path, but even when I access my profile, I do not know how to restore a functional bash. I somehow deleted my system’s ability to recognize Terminal commands including mkdir, -g, which, and so on.
A few Terminal promps that pop up on initialization:
-bash: open: command not found
-bash: /anaconda3/etc/profile.d/conda.sh: Permission denied
Any help here would be appreciated. I thought to restore from a backup, but Time Machine will not let me overwrite system configurations and I cannot drag & drop my old bash (the function to reveal hidden dot files is also disabled after deleting my bash) A link or gist to a good boilerplate bash profile for me to use would be nice, if anyone knows of one.
If /etc/skel exists on your machine, you can copy those files to your home directory to reset the profile to the default.

How can i create an empty file using a batch command? [duplicate]

This question already has answers here:
Create an empty file on the commandline in windows (like the linux touch command)
(27 answers)
Closed 5 years ago.
So far my project is all about creating files for an imaginary game and I have to create files (and files within files), first, I have to ask them what version they want, and then the batch will create new files on my computer.
I just want to know what is the command to create new files, no need for other info.
Yes, you can.
type nul > your_file.txt
It is already resolved here
Windows equivalent of 'touch' (i.e. the node.js way to create an index.html).

Where is Preferences.sublime-settings? [duplicate]

This question already has an answer here:
Sublime Text settings on Mac
(1 answer)
Closed 6 years ago.
I went into Finder, hit Command-F and searched my Mac for Preferences.sublime-settings but did not find it. It found a file I had saved in a non-used folder but did not pull up the actual file that I thought sublime would use. Where is it?
I ended up copy pasting the contents of the folder it did find into the sublime application manually. But I would have preferred to use a hard link to the file.
This is json/javascript file but from the extension you would not know this.
Update - Here is where we think it should be:
Use:
chflags nohidden ~/Library
and you will be able to browse Library in your home directory. You should find the file here:
~/Library/Application Support/Sublime Text 2/Users
Also, you can access this file directly from the Sublime Menu.

Resources