There is no utilites like find, grep , "ls -laR" to find files in Android os. IS there a way or is there a list of current default files in the os file system hierarchy?
Make a local copy of the files using adb pull /system system; adb pull /data data and use your favorite tools to search on your development machine. Or you can install BusyBox on the emulator, which gives you something intermediate between the extremely limited built-in command line and a full unix command line.
Related
I am working on wsl2+emacs GUI version with VcxSrv window manager server.
Within the GUI version, emacs does not open files with windows-app as it does in wsl2-terminal-emacs.
Take an example:
on dired window, I strike key & invoking dired-do-async-shell-command to open file "demestic.01.pdf";
it prompt to run with "xdg-open" rather than "explorer.exe".
Is it possible to replace "xdg-open" with "explorer.exe"?
EDIT:
You can take a look at wslview which is a part of wslu (it ships with latest versions of Ubuntu distro) and is a better alternative. wslview will try to detect the protocol used(file:, http:, https:), check whether it is a Linux path or Windows path, translate it to the proper form and open the file/folder/link.
And if you want everything to be opened in Windows, just create a link:
sudo ln -s ../../bin/wslview /usr/local/bin/xdg-open
So, whenever xdg-open is invoked, everything would open up in Windows
I'm trying to install Scalatra on windows seven and need to change a file to executable...the Scalatra documentation says to do this, which is unix. What is the windows equivalant?
chmod u+x srt
You can simply open the relevant folder with a unix command prompt (I use git bash) and execute the unix commands from there
To get scalatra-sbt going on Windows, either port you own sbt.bat from scalatra-sbt, or install chmod via cygwin.
Assuming you've successfully installed the rest of Conscript and giter8, you can start a project that downloads scalatra-sbt. From there, one can look through the ./sbt source, and port the bash script functionality to your own windows specific script, or install a unix compatibility layer into Windows. If you go down the "windows specific script" route, perhaps the scalatra-sbt would appreciate the project contribution.
The "unix compatibility layer" route will eventually allow you to run ./sbt. chmod is a unix command line function, and is provided in a default package of the tool set cygwin, which provides a complete lunix-like environment. Once inside a cygwin terminal, you can chmod your file, as mentioned in the scalatra-sbt first project.
Diving into the contents of ./sbt from scalatra-sbt, this is actually unix script wrapper around the scala build tool (also referred to, confusingly, as sbt). If while trying to run ./sbt you get strange '\r' errors, install the cygwin package dos2unix, and then run it on the sbt file. If you run into any "which: no curl in..." or "which: no wget in..." errors, go back to the cygwin installer, find those packages such as wget, and then install those programs.
By the way, the last thing the scalatra-sbt script runs is the Scala build tool. The Scala build tool sbt itself has many reported issues with cygwin's default configuration, so you will likely need to do more research. Depending on what issues you're running into on your specific setup, you may need to make changes to the end of the ./sbt script to adjust the parameters used to launch the Scala build tool.
is there a posibility to make eclipse PyDev use a remote Python interpreter?
I would like to do this, as the Linux Server I want to connect to has several optimization solvers (CPLEX, GUROBI etc.) running, that my script uses.
Currently I use eclipse locally to write the scripts, then copy all the files to the remote machine, log in using ssh and execute the scripts there with "python script.py".
Instead I hope to click the "run" button and just have everything executed within my eclipse IDE.
Thanks
Unfortunately no. You can remotely connect to your Linux server via Remote System Explorer (RSE). But can't use it as a remote interpreter. I use Pycharm. You can use the free Community Edition or the Professional Edition for which you have to pay for it. It is not that expensive and it has been working great for me.
As Adel says, this is probably not possible with the Remote System Explorer, or the normal Run button,
but you can automate the process you currently use. I had to do this for a few weeks when the fan was broken
in my laptop, and doing any significant computation there made it overheat and poweroff, so I just ran
everything on my work machine.
You can use the External Tools mechanism to run a short script that syncs your code to the remote server,
runs your script, then syncs back any output files to your local machine. My script looks like this,
is stored in $HOME/bin/runremote.sh, and is executable (chmod +x runremote.sh)
fp="$1" # Local path to the script we want to run--for now,
# this is the only command I pass in from Eclipse, but you could add others if so inclined.
# My home directory is a little different on my local machine than on the remote,
# but otherwise things are in the same place. Adjust as needed.
fp=`python -c "print '$fp'.replace('/home/tsbertalan', '/home/oakridge/bertalan')"`
# Run the synchronization. I use Unison, but you could use something else,
# like two calls to rsync, or a series of scp commands.
reposync >/dev/null # The redirection assumes your sync command will print errors properly on stderr.
cd='cd '`dirname $fp`
# I use a virtual environment on the remote server, since I don't have root access to install
# packages globally. But this could be any set-up command you want to run on the remote.
# A good alternative would be `source $HOME/.profile` or `~/.bashrc`.
act='source /home/oakridge/bertalan/bin/activate'
fname="`basename $fp`"
cmd="$act ; $cd ; python $fname"
# Run the command remotely. The -X forwards X11 windows, so you can see your Matplotlib plots.
# One difficulty with this method is that you might not see all your output just as it is created.
ssh bertalan#remote.server.edu -X "$cmd"
sleep 1
# My synchronization script is bidirectional, but you could just use rsync with the arguments flipped.
reposync >/dev/null
If you don't use linux or OSX locally, you'll probably have to use MinGW or Cygwin or whatever to get
this working. Or, since you appear to have a working Python interpreter, you could write an
equivalent script in Python, make it executable (by the file properties dialog in Explorer, I think),
and add a #!/path/to/python line at the top. I don't use Windows regularly, so I can't really help with that.
To use this in Eclipse, go to Run > External Tools > External Tools Configurations.... Add a new tools
whose Location is the path to your script, and whose first Argument is ${resource_loc}.
You can then use it with Run > External Tools > [first item], or bind it to a keyboard shortcut (I used F12)
by going to Windows > Preferences > Keys, and searching for "Run Last Launched External Tool". Presumably you'll
have to go through the menus first to make this the "Last Launched" external tool.
I'm back connected with a Freebsd server [netcat ] And There is a File On /tmp That i want to download it but
Its can't be browsed with My Browser So there is any ways to download it ?
because i don't have access to others folders . Just /tmp
You can use fetch(1)
eg. fetch https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js
or download wget with
pkg install wget
and use wget
eg. wget https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js
If you have an account on the server and the ssh daemon is running you can use scp. From a terminal emulator (e.g. xterm) you can do % scp freebsd.server.org:/tmp/file .. Of course replace freebsd.server.org with the correct name of the host.
If you're on windows, you could also use a graphical program such as Winscp.
If you have SSH installed on the server, you can use any SSH client out there. For Windows, WinSCP is a good option but if you run *nix OS with Gnome, Nautilus can do the same natively.
I installed a terminal i my iPhone and I'm trying to install some utilities on it. To achieve it the only thing I have left is to change the order of the PATH variables on the system but I cannot find the place where they're stored.
When I write $PATH I get
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games
I need to edit the path so the /usr/bin appears before of /usr/local/bin.
I've read sites where they tell me to edit ~/.bashrc, ~/.cshrc, ~/.profile or /etc/paths but none of them exist on my system (in fact in ~ there's just .bash_history and some unimportant directories)
I access to my iPhone (iOS 4.2.1) through ssh from a Leopard MacBook
Any ideas? Thanks
If your .bashrc doesn't exist, you should be able to create it and set it in there:
PATH=$PATH:/extra/path/here:/other/path/here
export PATH
It would appear that you are indeed using bash as your shell since you have a .bash_history, but if you are using a separate shell it could be a separate file.