Command prompt won’t change directory to another drive

As @nasreddine answered or you can use /d For more help on the cd command use: Displays the name of or changes the current directory. CHDIR [/D] [drive:][path] CHDIR [..] CD [/D] [drive:][path] CD [..] .. Specifies that you want to change to the parent directory. Type CD drive: to display the current directory in the specified drive. Type CD … Read more

Javac “cannot find symbol”

First, To compile the java source file using javac you need to specify the files to compile explicitly. Example: you need not provide the path if the source file is in the current working directory. Second, whenever java encounters import abc.xyz.ClassName; it tries to resolve abc/xyz/ClassName with respect to the classpath or current working directory. … Read more

Git error on git pull (unable to update local ref)

My team and I ran into this error, unable to update local ref, when doing a pull in SourceTree. Update 2020: Per @Edward Yang’s answer below, @bryan’s comment on this answer, and this question/answer you may need to run both git gc –prune=now and git remote prune origin. Running only the former has always worked for me but based on ppl’s responses … Read more

How to create a file in Linux from terminal window? [closed]

Depending on what you want the file to contain: touch /path/to/file for an empty file somecommand > /path/to/file for a file containing the output of some command. eg: grep –help > randomtext.txt echo “This is some text” > randomtext.txt nano /path/to/file or vi /path/to/file (or any other editor emacs,gedit etc)It either opens the existing one for editing or creates & opens … Read more