in linux what are ls flags in sftp [closed] - linux

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
in linux, we have lots of flags to list files in command ls. we can't do the same inside sftp commannd. For example, in linux, I can list a file's full time by runnling command:
ls --full-time filename
when I sftp to a server, I can't run command: ls --full-time.
The ls help in sftp doesn't list all available flags. So can you please tell me what are ls flags in sftp?
Thank you!

The ls command in sftp is an internal sftp command which is in no way related to the ls command of the remote system's core utilites.
sftp (which has a similar interface as ftp) provides it's internal commands to allow listing of files(among other commands), which does not invoke the ls of the core utilities. So do not expect the same behavior.
For more details on sftp's internal commands please refer to sftp manpage or this page

Related

How to filter results using wildcard in linux command line [closed]

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 11 months ago.
Improve this question
I'm trying to list the contents of /usr/bin having "ab" in their names.
I wrote the following command:
ls /usr/bin *ab*
But it didn't work.
Is there any other command that can be used to achieve my purpose?
Thank you.
Your command:
ls /usr/bin *ab*
asks ls to list two things: the contents of the /usr/bin directory as well as any files matching the wildcard *ab* in your current directory. If there aren't any files matching *ab* in your current directory, there's probably an error message before or after the listing of /usr/bin; if there are such files, they'll be listed. Instead, you want:
ls /usr/bin/*ab*
... which asks your shell to give ls the expanded list of files in /usr/bin that match the wildcard.

Why 'which -a cd' command doesn't give any output in linux? [closed]

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.

Copy file from remote host to local host [closed]

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 7 years ago.
Improve this question
I have the following username#machine connection
user1#machine1 -> user2#machine2
How can I copy files from machine2 to machine1?
You can use rsync
Use it like this:
rsync -avz -e ssh remoteuser#remotehost:/remote/dir /this/dir/
Here is step by step tutorial. You can read about differences between rsync and scp here
You can use scp
Use it like this
scp <source path> <destination path>
Where the remote file is addressed as user_name#host_name:path/to/file
Suppose you want to get a file named a.txt which is in the home directory of user user2 on machine2 say, 192.168.1.10. You can do this on your machine1,
scp user2#192.168.1.10:a.txt .

Telnet to Embedded linux board: command not found [closed]

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
I'm trying to telnet to an embedded Linux based device and I'm able to log in successfully using the root credentials. However, I'm not able to run many bash commands.
Commands like mv, cp, cd, ls, etc. are working, but commands like uname, df, install, etc. (even commands required for POSIX compliance!) don't seem to work. Can't seem to figure out what I'm missing.
# install
-sh: install: not found
# uname -1
-sh: uname: not found
# ls
bin etc lib opt sbin tmp utils
dev home mnt proc sys usr var
Usage of Busybox as shell interpreter is very common in embedded world.
It's an ash interpreter that can be compiled with minimum functionality.
Try to determine shell interpreter you have on your system using this tips:
How to determine the current shell I'm working on?
You can "ls /usr/bin" and "ls /usr/sbin" to see what commands are physically available.

Change dir after 'sudo -i', in one command [closed]

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
Is there a way to switch dir after doing sudo -i (in one command)?
We use lots of ssh connections on work, and it is a pain to manually set them up when you reboot your pc. So I'm trying to make aliases like ssh remote-dev -t 'sudo -i; bash -l', which connects me to a machine and makes me root there (it is required to do that way; because of Kerberos we can't directly ssh root#...)
So what I would like to do now is expanding the above command in a way that I can also tell it to switch to a specific dir after the sudo, or open a specific file, or tail a logfile or something... Is that possible?
-- edit: Of course you could tell it to do some command everytime someone logs in via ssh. But this is a bad option, because only I want to have these commands to be executed; When other people connect to this machine, they probably want different commands.
-- edit: Sorry I posted it here, did not realize it is offtopic in stackoverflow
Try
sudo -i bash -c "cd /path/to/dir; exec bash"

Resources