Tag Info

Hot answers tagged


It's not a / character (U+002F); it's some Unicode character that just looks similar. Try ls | hexdump -C to see what it is. Some possibilities are FRACTION SLASH (U+2044), DIVISION SLASH (U+2215), MATHEMATICAL RISING DIAGONAL (U+27CB), and the combining solidus characters U+0337 and U+0338, but there's no way to tell which one from your screenshot.


try ls ?_???? | sort -t_ -k2,2n -k1,1 where -t_ means _ is separator -k2,2 -k1,1 means sort by k 2 and key 1


Use find which is better suited for your intended purpose: find . -name "mkmf*" It will list all appearances of your pattern including the relative path. For more information look at manual page of find with man find or go to http://www.gnu.org/software/findutils/manual/html_mono/find.html


rmdir will delete empty folders (while leaving other folders alone), so you can use something like: rmdir */ Or, if you're using bash 4+ and you want recursiveness (other shells have other names for the same thing): shopt -s globstar rmdir **/ This will give you a lot of error messages, however (one for every non-empty folder).


This looks for files in the data directory that contain a dot followed by f or u but not ending in f or u: ls -lL datafiles/*.*[fu]*[^fu] Answer to version 1 of this question You wrote "f or u". To write that in a glob, use [fu]. To also insist that the f or u be preceded by a dot, try: ls -lL .*[fu]* *.*[fu]* The first glob above, .*[fu]*, expands ...


From the dir info page: dir' is equivalent tols -C -b'; that is, by default files are listed in columns, sorted vertically, and special characters are represented by backslash escape sequences. ls doesn't have color by default but only when it is called with e.g. --color=auto or the environment variable LS_COLORS is set. Usually the command ls is ...


Try this: find / -not -path "*/tmp/*" -size +10000k -ls 2> /dev/null | \ sort -n -k7 | egrep -v 'ibd|MYD|MYI' Explanation: find / -not -path "*/tmp/*" -size +10000k -ls: find everthing whose path does not start with /tmp/ with the size greater than 10000k and prints the output in find's own ls -dils format. sort -n -k7: As your statement in the ...


I think this might be a better way to solve the problem... find . -maxdepth 1 -type f -size +20M -exec ls -Shal {} \+ | head To get rid of any errors while find tries to access files that you don't have permission to read you might want to add find . -maxdepth 1 -type f -size +20M -exec ls -Shal {} \+ 2> /dev/null | head

Only top voted, non community-wiki answers of a minimum length are eligible