10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
So I'm trying to search for the top 10 or 15 items under a directory by file type. I want to run a command on a directory and get something like the following:
Example of expected output.. .PDF: 100, .txt: 95, .word: 80..
What would be the best way of going about this? I've searched around... (2 Replies)
Discussion started by: shackle101
2 Replies
2. Shell Programming and Scripting
Trying to delete my 3 oldest files.
I am learning despite the many questions.
This shows the files.
ls -1r /media/andy/MAXTOR_SDB1/Ubuntu_Mate_18.04/Ubuntu_Documents.zip_* | tail -n+6adding this on did not work.
| -exec rm {}------ Post updated at 05:43 PM ------
This works, but I... (15 Replies)
Discussion started by: drew77
15 Replies
3. Shell Programming and Scripting
Hi,
I have a script doing backup to synology server, the script create new folder each day with the date as being folder name i.e. 2018-07-30. Just before creating the new folder I want the script to find the oldest folder from the list and delete it including its content.
for example... (3 Replies)
Discussion started by: humble_learner
3 Replies
4. Shell Programming and Scripting
Hi Team,
I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder.
Eg:
parent folder --> /Interface/data/test/IN
Sub folder -->/Interface/data/test/IN/Invoice20180607233338
Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 Replies
5. Shell Programming and Scripting
Hi
I am want to create a script where the file gets moved from the current folder to a folder transfer based on the oldest first. This script should run one file at a time using a loop. I want it as a loop because I want to do some processing while I have one file. Can anyone guide me on this? (2 Replies)
Discussion started by: chamajid
2 Replies
6. Shell Programming and Scripting
What is the best way to get the file count (Including the subdirectories) under a folder? (12 Replies)
Discussion started by: un1xl0ver_rwx
12 Replies
7. Shell Programming and Scripting
I have a file containing about 5 million rows, in the file there are some records which has extra delimiter at random position. (we dont know the positions), now we have to Count the delimeter from each row and if the count of delimeter is not matching then I want to delete those rows from the... (5 Replies)
Discussion started by: Akumar1
5 Replies
8. Shell Programming and Scripting
Hi there,
i have a question.
I have a folder called /usr/test
There is a file in it.... test.csv
I need not a shell script that checks if there is a file called: test.del
And if the file is in the same folder then the script should delete the test.csv and also the test.del.
Hope... (9 Replies)
Discussion started by: Bjoern28
9 Replies
9. UNIX for Dummies Questions & Answers
Hi all,
I amd new in UNIX programming. I have a query.
I need to delete some files (like .dec files) from some folders. I have a list of folders. What will be command for it.
Please help me.
Thanks in Advance. (6 Replies)
Discussion started by: eclairs
6 Replies
10. Shell Programming and Scripting
hello people
i need your help please
i want to achieve the following with the simplest, most efficient shell-tools:
i have a directory with a lot of files from users.
the script should check which partition the dir is on
if the partition with the directory is more than 90% full
... (2 Replies)
Discussion started by: scarfake
2 Replies