Linux command 'll' is not working
Try sudo ls -l
.
As ll
is a shorthand for ls -l
.
ls command is not working in bash.Error messages are getting displayed whenever I open bash
I have followed what David C Rankin has mentioned in comments.
These are following the below steps:
opened terminal using cntrl+Alt+F2
Later added path step by step using export command
as
export PATH ="/opt/ros/kinetic/bin:/home/neelesh/bin:/home/neelesh /.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin: /bin:/usr/local/games:/snap/bin"
Later using ctrl + alt + F7, I have exited the terminal.
restarted the system.
Now everything works fine.
Command 'ls' not working in command prompt
Use the command dir
to list all the directories and files in Windows; ls
is a unix command.
ls' is not recognized as an internal or external command, operable program or batch file
I'm fairly certain that the ls
command is for Linux, not Windows (I'm assuming you're using Windows as you referred to cmd
, which is the command line for the Windows OS).
You should use dir
instead, which is the Windows equivalent of ls
.
Edit (since this post seems to be getting so many views :) ):
You can't use ls
on cmd
as it's not shipped with Windows
, but you can use it on other terminal programs (such as GitBash). Note, ls
might work on some FTP
servers if the servers are linux
based and the FTP
is being used from cmd
.
dir
on Windows
is similar to ls
. To find out the various options available, just do dir/?
.
If you really want to use ls
, you could install 3rd party tools to allow you to run unix
commands on Windows
. Such a program is Microsoft Windows Subsystem for Linux
(link to docs).
ls - Not working in certain directories
The problem is in how *
works in the shell.
Some people think that when you write ls *
the shell will run ls
passing the wildcard and that command will list all the files. But actually it is the shell that expands the *
into a list of all the files and passes them to ls
.
TL;DR; you have a directory name that starts with -
! (I think that it is named just -
). So when you run ls -d */
it is expanded to something like ls -d -/ bar/ muz/ ...
. You can see the actual expansion with echo ls -d */
Solution: write ls -d -- */
. The --
will tell the command not to interpret any further command starting with -
as an option, but as a file name.
Related Topics
.Htaccess Redirect Index.PHP to /
Programmatically Disable Hardware Prefetching on Amd Systems
Check Library Version Netcdf Linux
Linux Kernel Changing Default CPU Scheduler
Systemd/Udev Dependency Failure When Auto Mounting Separate Partition During Startup
Open File in Default Editor from Bash
How to Avoid Grub Errors After Running Apt-Get Upgrade - Ubuntu
Terminal "Png" Missing When Using Gnuplot
How Does Docker Share Resources
Get X/Y Position of Caret (Input Text Cursor) Under Xorg
Linux Kernel Aio, Open System Call
I Would Like to Store All Command-Line Arguments to a Bash Script into a Single Variable
Why Is Git Creating Read-Only (444) Files
Libv4L2: Error Turning on Stream: No Space Left on Device
Elastic Beanstalk: Log Task Customization on Amazon Linux 2 Platforms