Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
While doing scp from host PC(ubuntu-12.04) to target board(IMX6), it is giving following error:
#scp Test.txt root#10.20.119.101:/home/root
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Inappropriate ioctl for device
Test.txt 100% 8599 8.4KB/s 00:00
#
Can you guide to fix this issue.
According to these texts (I googled the error), this happens if the super-user account has its default shell changed to bash.
Never do that. It is bad practice to change the default shell for the root user.
See this thread on the comp.unix.admin USENET forum.
I have used ash instead of bash then the error was not observed.
Existing:
/bin/sh -> /bin/bash
Modified:
/bin/sh -> /bin/ash
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
This is failing. (the file.txt is in the same folder)
sudo scp file.txt shahid#11.34.45.23:~/
#gives error Permission denied (publickey).
The following works, however, it asks for the local machine password
sudo scp me#localhost:/home/file.xt shahid#11.34.45.23:~/
If the file.txt doesn't contain any critical data, change its permissions to allow reading by others:
$ sudo chmod 744 file.txt
And then try the scp.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
'Which' command gives the full path to the command. All other commands are working except cd command.
Think about how shells and changing directories work: For each command you enter it will start a new process for the command. Changing directory only applies to the currently running process. If the cd command was executed as an external command, then it would run it its own process, change its process directory, and then the process would exit and the parent process (the shell) would not know anything at all what the child process did.
Therefore the cd command can only be internal to the shell. It has to be parsed and executed completely by the shell and its own process.
cd is a builtin command in bash.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I've already posted this question here:
https://superuser.com/questions/1067609/how-to-run-a-bash-script-via-absolute-path
But I hope that maybe If I duplicate it here, I will get my answer sooner :)
I have a file:
/Users/danylo.volokh/test/test_bash_script.sh
Content is very simple:
#!/usr/bin/env bash
echo "-- print from script"
I'm in folder "danylo.volokh"
This command runs fine:
Danilos-MacBook-Pro:~ danylo.volokh$ test/test_bash_script.sh
-- print from script
But if I try to run in with absolute path I get an error:
Danilos-MacBook-Pro:~ danylo.volokh$ /test/test_bash_script.sh
-bash: /test/test_bash_script.sh: No such file or directory
I want to run a command with absolute path from any folder and get the script to be executed.
Your path in incorrect. You should run:
/Users/danylo.volokh/test/test_bash_script.sh
/test/test_bash_script.sh looks for the file from the root directory! Your path should be from the root, not from the current directory.
Try /Users/danylo.volokh/test/test_bash_script.sh.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
while compiling the c++ programs in which i'm using the libxml library it is showing errors at the header files that no file or directory found. I have installed the library but it still showing errors. So i just type the above command after that every thing is working fine but i didn't understand it.
what is the meaning of "../" in UNIX? my command in UNIX is like this "sudo cp -r libxml ../" what it means? how to give relative addresses in UNIX and what are the different wildcard is used.
.. represents the parent directory. For example, if the current directory is /home/user/ the parent directory is /home
. represents the current directory
The command sudo cp -r libxml ../ copies the entire directory libxml in the parent directory.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I am trying to use fuse and sshfs to mount a drive. The command I use to do this is
sudo sshfs computer2#24.97.20.3:/Volumes/1TB\ Extra/MoodleMount /mnt/CampusServer -o allow_other,uid=33,gid=33
It mounts fine every time. No password needed because the ssh keygen is saved on the server. This is my fstab file.
/dev/xvda / ext3 defaults,errors=remount-ro,barrier=0 1 1
sshfs#computer2#24.97.20.3:/Volumes/1TB\040Extra/MoodleMount /mnt/CampusServer allow_other,uid=33,gid=33
I took out the -o because it was giving me more problems. After I added the second line to the fstab file I get the following error when running "mount -a"
mount: unknown filesystem type 'gid=33'
Any suggestions on what I am doing wrong?
You've neglected to include the file system type in the fstab line. You should use
sshfs#computer2#24.97.20.3:/Volumes/1TB\040Extra/MoodleMount /mnt/CampusServer fuse.sshfs allow_other,uid=33,gid=33