I want to include a ftp share into my normal filesystem by performing the following commands:
$ mkdir /Volumes/myfolder
$ mount_ftp ftp://user:password#ftp.domain.tld /Volumes/myfolder
I get no error message, but when I open the folder, the folder is just empty. I also tried to follow the instructions listed here, but I receive the error "The share does not exist on the server. Please check the share name, and then try again.". However, I can access to the share by typing ftp://user:password#ftp.domain.tld into my adress bar.
Any ideas what I could do wrong?
As you'll see in man mount_ftp, mount_ftp can set several return values. One way to get the return value is to say echo $? right after the mount_ftp command.
Related
scp -r /Users/Brain/Desktop/tree.png account#address:/home/directory
I successfully connect to server and enter password, but receive this message "/Users/Brain/Desktop/tree.png: No such file or directory found"
I know the file exists, it is sitting on my desktop and I can open it.
Any guidance would be much appreciated!!
Tried looking at this post but it did not help:scp files from local to remote machine error: no such file or directory
Typo? For a location like /Users, better odds are suggested for a person with the name Brian over one like Brain. After reversing the vowels, what happens with this command?
ls -l /Users/Brian/Desktop/tree.png
When presented with unexpected errors for file(s) known to exist, there's usually an issue with one pathname component. Start with the full path and drop trailing components until there's no error, eg:
ls /Users/Brain/Desktop/tree.png
ls /Users/Brain/Desktop
ls /Users/Brain
ls /Users
Some shells can trim a pathname component from the previous command with :h ; try repeating this:
!!:h
After typing the above, another possible shortcut is UP-arrow RETURN
I need to see server logs in different machines( around 20 ) and server logs are stored in location with hostname in their path ( I am using super putty).
So I dont have single command to chnage directory instead i have to do it individually.
With hostname command i can get m/c name but i am not able to use as vraible in my cd command.
>hostname
mymachinename
>cd /opt/$"hostname"/logs
no directory name /opt/hostname/logs
Any help on this?
Pardon me if its duplicate. I searched but didn't get any questions related to this.
shold be
cd /opt/$(hostname)
See..
root#mongodbServer1:~# cd /opt/$(hostname)
root#mongodbServer1:/opt/mongodbServer1# pwd
/opt/mongodbServer1
root#mongodbServer1:/opt/mongodbServer1#
Use $HOSTNAME or $(hostname) or `hostname` (inverted quote) to retrieve the hostname.
cp EFI/boot/loader.efi to EFI/boot/bootx64.efi
I understand that this is the copy command, but what exactly happens to files individually when this command is run on them. Do we get duplicate files or do we get only one file? I am trying to recreate the action on Windows, as I do not have sudo access on the linux I am working on.
I got this command from a question on this forum. Please do not ask any more questions as to clarify this question. Thanks for all your answers!
This copies looder.efi to bootx64.efi. If the bootx64.efi file does not already exist, the cp command creates it. If it does exist, the cp command replaces its contents with the contents of the looder.efi file.
I keep getting errors saying bash command not found, also I am unable to make changes as it asks for root, even though I am an admin and own the laptop.
I was also able to type .. and move up a directory and now I cannot for some reason.
My second issue is I was formerly able to complete commands in terminal using the key but now it does not seem to work.
I must add that my $PATH looks very long and muddled at the moment so this may be an issue.
because your $PATH only contains system admin binary file path, use need to set env like this
export PATH=$PATH:/usr/local/bin
make sure your local binary file is under dir of /usr/local/bin
Is it possible, in unix, to make it so that a system message appears once a user has changed (cd) to a particular directory?
I know about motd, but I'm wondering if there is something similar to that for navigating in the shell. For instance, if I typed
cd /etc/apache2/
a message could be printed to the screen...something like:
"The latest configuration modified in this directory was..."
"Please be careful modifying ... and ..."
something that all users could potentially see?
You could create a script file in each folder that you want to have execute when entering the folder. Then you can use the environment variable PROMPT_COMMAND to check for it and execute. For example:
export PROMPT_COMMAND='test -x ./.prompt_command && ./.prompt_command'
This will execute a script called .prompt_command in the current folder only if it exists and has its executable bit set.