Maximum number of inodes in a directory? [closed]
df -i should tell you the number of inodes used and free on the file system.
df -i should tell you the number of inodes used and free on the file system.
The option ‘-l’ tells the command to use a long list format. It gives back several columns wich correspond to: Permissions Number of hardlinks File owner File group File size Modification time Filename The first letter in the permissions column show the file’s type. A ‘d’ means a directory and a ‘-‘ means a normal … Read more
#set timestamp for file touch –date “2011-12-31” /tmp/foo # Find files newer than 2011/Dec/31, in /some/files find /some/files -newer /tmp/foo
using sed? ls -1 | sed -e ‘s/\..*$//’
This will list all files except the newest three: ls -t | tail -n +4 This will delete those files: ls -t | tail -n +4 | xargs rm — This will also list dotfiles: ls -At | tail -n +4 and delete with dotfiles: ls -At | tail -n +4 | xargs rm — … Read more
exa is a replacement/enhancement for ls. If you pass on the arguments -lh with exa, it will include a header row printing the column names like so: exa -lh Example output: Permissions Size User Date Modified Name .rwx—— 19 username 29 Sep 11:25 dont_cra.sh drw-r—– – username 29 Sep 11:26 f1 .rw-r–r–@ 811k username 29 … Read more
You are confusing regular expression with shell globbing. If you want to use regular expression to match file names you could do: $ ls | egrep ‘.+\..+’
Regarding the ls(1) documentation (man ls): -A, –almost-all do not list implied . and .. you need (without any additional argument such as .*): ls -A or better yet: /bin/ls -A
ls -U will do the ls without sorting. Another source of slowness is –color. On some linux machines, there is a convenience alias which adds –color=auto’ to the ls call, making it look up file attributes for each file found (slow), to color the display. This can be avoided by ls -U –color=never or \ls … Read more
It would be: cp `ls -SF | grep -v / | head -5` Directory assuming that the pipeline is correct. The backticks substitute in the line the output of the commands inside it. You can also make your tests: cp `echo a b c` Directory will copy all a, b, and c into Directory.