LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-14-2013, 01:49 PM   #1
slufoot80
Member
 
Registered: Nov 2011
Posts: 61

Rep: Reputation: Disabled
Cool SFTP listing files


Ok the problem I have is

when I sftp to a system and run the "ls" command I get a short listing.

what I want it to do when I run the "ls" command is give me a long listing

Is there a file that I would edit to set this alias and not use the alias command outside of the sftp command
 
Old 01-14-2013, 02:01 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,566

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
You can setup your alias in the users .bash_profile or in the /etc/profile. Sftp uses the ssh protocol and will load your local user aliases as if you were connecting via SSH.
 
Old 01-14-2013, 07:21 PM   #3
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,261

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
A lot of distros come with "alias ll='ls -l' " already setup.
Why not use that instead; it'll be less confusing if someone actually logs in and expects the normal response from ls.
Principle of least surprise...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch files to execute and transfer files via sftp cm67 Linux - General 5 08-13-2009 09:59 AM
Piping directory listing to sftp questiong scoghill Linux - General 1 01-24-2008 03:35 AM
Help with listing files sandeshsk007 Linux - Software 10 12-07-2007 04:04 PM
listing files and burning files - just a question radiodee1 Debian 1 11-26-2006 07:29 AM
Files truncated by sftp/sftp-server at 65kb gato Linux - Networking 1 12-18-2003 10:29 AM


All times are GMT -5. The time now is 11:56 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration