ls
What does the ‘d’ mean in ls -al results and what is that slot called?
In Linux, what does the d mean in the first position of drwxr-xr-x? And what are all of the possible letters that could be there, and what do they mean? I’m trying to learn more about the Linux file permissions system, and I’d like to see a list of the character meanings for the first … Read more
Determining the number of files and subdirectories in Linux
When displaying directories in Linux using ls -ld, I get something like this:
+ or @ mark after running ‘ls -al’
In Mac OS X, run ‘ls -al’ gives me something like this. drwxrwxrwx+ 4 smcho staff 136 May 5 09:18 Public drwxr-xr-x+ 6 smcho staff 204 Feb 1 2010 Sites drwxrwxrwx 9 smcho staff 306 Feb 2 2010 backup [email protected] 36 smcho staff 1224 Sep 4 22:51 bin What’s the + or @ at the … Read more
size of directory reported by ls
I understand the size reported by ls corresponds with number of inodes inside the directory, not their actual size. I have noticed peculiar behavior, when displaying directory size with ls. Here is how to quickly reproduce it: first create empty directory, the size reported by ls is 4096 (as expected) mkdir test ll -d test/ … Read more
The ls command is not working for a directory with a huge number of files
I had a directory which had around 5 million files. When I tried to run the ls command from inside this directory, my system consumed a huge amount of memory and it hung after sometime. Is there an efficient way to list the files other than using the ls command?
dircolors: modify color settings globaly
I understand ls uses dircolors to display colored output. dircolors has default database of colors associated with file extensions, which can be printed wiht the command
Show only hidden files (dot files) in ls alias
I’m using the command
List subdirectories only n level deep
Festival stores voicepack data in the following example directory structure:
How do I pipe ls to grep, and delete the files filtered by grep?
I wanted to delete some package in my home file, but the filename was too long (google-chrome-stable_current_i386.deb). So, I decided to use the command ls|grep chrome|rm to pipe the files to grep to filter out the chrome file, and then remove it. It didn’t work, so I would like to see how I can do this.