Folder disappeared after reboot in CentOS - centos

I am a Windows user new to CentOS 7.
I was running as root, and did some development work. I created a folder called 'docker' under '/dev'. During development I edited several files in Kwrite, and this session went of for several hours.
Then I rebooted the machine, whole '/dev/docker' folder is missing. And KWrite's recent folder list does not show my files. As if yesterday never happened :-).
Few months ago I faced same problem, and this happens randomly.

/dev is a special file system for devices. It gets recreated and repopulated by the kernel when your computer starts up.
It should not be used for general files - documents, source code, music etc.
Also, you shouldn't be running as root. Create a user and keep your files in /home/username.
If you have to run as root, root's home directory is /root

Related

ubuntu 16 with visual studio code locking every folder when its created

I'm currently trying to get off of Windows and have started doing more Javascript development in visual studio code on a desktop setup running Ubuntu 16. Every time I'm building something with Angular or any modern JS framework where I'm creating components from the command line, it will lock those files or folders and tell me I don't have admin access and I have to continually unlock those files or folders every time I want to save my work.
I'm normally using Webpack or Brunch so I'm using the --watch function so when I make a change it will recompile and then refresh the browser with my changes.
I've used Nautilus to unlock the project folders, I've also used
sudo chmod 777 -R /path to folder
To try and unlock the files at the project folder level thinking by doing so any additional file or folder added therein would be unlocked, but its not working.
My question then is what do I have to do or settings can I change so this isn't an issue any more? I love my Linux setup and would hate to have to go back to Windows because of a minor permissions issue like this.
Any help or advice is greatly appreciated.
Pete

Netbeans Remote Synchronize doesn't list files when a subdirectory is used as upload directory

I've setup several sites previously to use Netbeans Remote Synchronization so I can edit files on the server from my machine and it has worked perfectly.
The problem I'm having right now is that when my FTP configuration in Netbeans uses the root folder it lists everything correctly but when I use a sub directory for example website.com/subdir as the upload directory or as the FTP initial directory the sync results come up blank - doesn't list anything at all on the remote side except directories in that sub directory.
My PC is a windows 7 64 bit machine, and the server is a standard shared hosting account running CPanel.
Also, I have been able to run the subdir synchronization on a different pc, could it be the firewall on this one? If so, why does it list the root folder properly?
Has anyone else had this issue? Any suggestions on how to fix it?
Thanks.
found the problem. The FTP path on this PC required the /public_html before the subfolder paths. i.e. essentially ftp://mydomain.com/public_html/path/to/subfolder
This wasn't the case on my laptop as I used the subfolder path right after the domain i.e. ftp://mydomain.com/path/to/subfolder and it worked fine, different versions of netbeans perhaps.

Is there a method for sharing and syncing the iOS simulator Applications folder

Our sales team often needs to give demos of apps currently in development. We've used a variety of methods to get them installed on their laptops but everything has been very manual.
The initial method we were using had us downloading the source code and compiling each and every project for each and every salesman. Very time consuming and annoying.
Then we got a little smarter and realized that we could copy out the Applications folder for the iOS simulator and just past that over the iOS simulator's Applications folder on each salesman's laptop. Much better, but still the manual part of copying them all over to each laptop.
So I started poking around about some folder syncing options for macs and came across this technique http://www.youtube.com/watch?v=iWoXPWlu_Dk
Very awesome and seemed to meet my need exactly. I had one central shared folder I could throw new iOS applications into and then the salesmen's laptops would automagically sync with that applications folder and new apps would just appear with no need to ever have their laptops here.
Unfortunately, the iOS simulator does not seem to be recognizing the Applications folder when it's a symbolic link or alias. Is there some Mac magic that could make this work? (I'm a Windows guy normally, just recently been working in the iOS world, so there could be something basic I'm missing here).
I'd love to have the Applications folder /Application Support/iPhone Simulator/5.1/Applications be a shared folder that syncs automatically for them, grabbing any new applications we have ready for demos (and getting them updates to old ones). Just seems like a nice smooth way to get them early builds.
We've used services like TestFlight for the actual devices and that's a great option for that, but when they don't have a device handy or are just blasting through demos on their laptops we'd love to have a nice easy process for keeping them up to date with new builds for their simulator install.
First a bit of background, you don't really need this, but I like teaching :).
On Unix, and now MacOS, there are two basic kinds of links. 'normal' links, and symbolic links. Alias, on windows, unix and mac are a kind of symbolic link: the link contains a reference to the original file. Normal, or hard links create a second directory entry that points to the data, if you delete the original file, the OS knows that there is still another entry pointing to it, so it only actually deletes the file (or directory) when all hard links have been removed. The disadvantage of hard links is that they have to be on the same file system, so that the file system can keep count of how many hard links there are.
OK, I've just installed Dropbox, and it seems that it creates a real folder in the user's home directory, so unless you're a complicated disk partitioning scheme, or file vault 1, where the user's home directory is actually an encrypted disk image, you can use a hard link. It also means that you don't need to copy or sync, as Dropbox is already doing that.
One thing not corrected, but didn't actually point out is that in your post, you seem to be copying to /Application Support, not ~/Library/Application Support or /Library/Application Support. Since you've got the basic scheme working without dropbox, I'll assume that is a typo.
Before I give you the commands, you might want to delete the old iPhone Simulator Applications directory with the Finder, instead of using the rm command, as the rm command is potentially very destructive.
OK, finally, the commands to do the linking; the quotes are important whenever filenames contain spaces. This example is for ~/Library
rm -rf "~/Library/Application Support/iPhone Simulator/5.1/Applications"
ln "~/Dropbox/Simulator Applications" "~/Library/Application Support/iPhone Simulator/5.1/Applications"
This should work, you can stop reading now, the rest is just more education :)
Tilde (~) is a short cut for the users home directory. Use the commands without this to work on /Library instead.
If you want to be sure you've got the exact path, you can drag files and folders from a finder window into the terminal, the path gets pasted instead of the file.
If you're messing with stuff in the root filesystem, you might need superuser rights. If you are logged in with an admin account, you can run single commands with superuser access as follows.
sudo ln "/Library/Application Support/iPhone Simulator" fred
The shell asks for your password, and then runs the command for you as superuser.
sudo remembers the authorization for a few minutes, then you have to authenticate again.
Haven't tested this since I only have one Mac, but give this a try:
Install Dropbox
Create a shared folder there and copy your apps from /Users/USERNAME/Library/Application Support/iPhone Simulator/5.1/Applications
Create a shell script to copy them back to the simulator's location, and add it to the shared folder. It should look something like this:
#!/bin/sh
cp -R ~/Dropbox/Appfolder/appname ~/Library/Application Support/iPhone Simulator/5.1/Applications/
Have your users sync their dropboxes to get the files, then run the shell script to copy the files.

Recovering netbeans local history

I had a Virtual Machine inside which I had my PHP project. The project was developed using Netbeans, and I used its local history extensively.
My VM Ubuntu installation got corrupted, so I ended up creating a new VM. I was able to copy over most of the files from the VDI (I attached it to the new VM), but I can't figure out where netbeans' local history is saved. I copied over the Netbeans project folder, but the history doesn't seem to be saved here.
Does anybody know how I can recover the Netbeans history?
Local History is kept in the .netbeans settings folder. On my Windows 7 machine that is located at <HOME>/.netbeans/<NB_VERSION>/var/filehistory where HOME is my user home and NB_VERSION is the version of NetBeans (e.g. 7.0).
Unfortunately this is an all or nothing thing. There is no way, that I can tell, to find specific projects. So, if you have local history for projects on your host machine you run the risk of overwriting these.
If you're looking for it on a Mac, the file local history is located at /Library/Application Support/Netbeans//var/filehistory.

App not installed...because its resources have been modified

One user cannot install my app because they continue to receive the error:
The application “myapp” was not installed on the iPhone “myPhone” because its resources have been modified
I've read the error occurs because of adding files after the app is built. I have not added any files. Last week, the user could install the ad hoc without issue. I've tried clean and rebuilt with no luck. As the developer, the ad hoc installs fine on my device from iTunes, even after deleting all profiles. Any ideas?
IF this is an adhoc distribution, I'd clean and re-build it, then give it to the user again, along with the provisioning profile : basically make sure they have a clean set of everything.
There is also a reported issue on Vista / Win7 where windows corrupts the Zip. It may be worthwhile distributing it as a ipa file rather than a zip
For me the issue was the .Double files being added to every directory on a shared network drive. We are primarily a Windows environment, and the Mac was saving .Double files on the drive, in every directory.
Literally, to fix the issue referenced above, I simply deleted the .Double files in every directory (of the app being copied to iTunes) and it fixed it.
Hope this helps someone!
This issue also occurs when the person trying to install the .app file has double clicked on the appname.app folder (its shown as a folder in windows environment). When they do it, a thumbnail file is created in the windows environment. This in turn means that the resources have been modified and hence the error. We have always instructed our clients not to double click on the .app folder when they extract it from the zip file.