Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to see some of the files in a directory but even when I do ls | tail -10, the command is slow (probably because of the large number of files) that nothing happens and I can not see any files. Any ideas?
I am trying to see some of the files in a directory but even when I do ls | tail -10, the command is slow (probably because of the large number of files) that nothing happens and I can not see any files. Any ideas?
You've got a large number of files. I've seen this happen lots, when a directory gets very, VERY full. You'll either get "argument list too long" or some other sort of error, if you've got tons of files.
I'd clean the directory up. A quick-and-dirty way would be to create a sub-directory, and do a "mv * ./<sub directory you just created name>", let it run a few seconds, and CTRL-C. There's a flag for MV that'll just move files, but I don't know what it is off the top of my head, check out the man page for mv.
Repeat those steps...soon you'll have all your files into separate sub-directories, of more manageable size. If the MV blows off due to too many files, you'll have to give it a finer filter, like "mv 1*.ext". I feel your pain...
You've got a large number of files. I've seen this happen lots, when a directory gets very, VERY full. You'll either get "argument list too long" or some other sort of error, if you've got tons of files.
I'd clean the directory up. A quick-and-dirty way would be to create a sub-directory, and do a "mv * ./<sub directory you just created name>", let it run a few seconds, and CTRL-C. There's a flag for MV that'll just move files, but I don't know what it is off the top of my head, check out the man page for mv.
Repeat those steps...soon you'll have all your files into separate sub-directories, of more manageable size. If the MV blows off due to too many files, you'll have to give it a finer filter, like "mv 1*.ext". I feel your pain...
Sadly or maybe happily it is not my directory but I will try using cp.
I do need to use these files so I am not too happy with this set up.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.