Tagged Questions
5
votes
3answers
206 views
Walking through files in directory randomly
How to change for track in *.mp3; do so that all .mp3 files in the current directory are walked through but in a random way?
1
vote
2answers
120 views
Get directory that script was called from
I have a script doSmth in /usr/bin. Is it possible to print the directory the script was called from is printed out by the script?
So If I call doSmth from /home/me the output will be /home/me.
0
votes
2answers
1k views
How to calculate in linux number of file inside nested directories?
I need to extract information how much files are in some directory tree:
/.../testRoot/test1/test11/..../file1
/.../testRoot/test1/test11/file2
/.../testRoot/test1/test11/..../file3
...
2
votes
3answers
148 views
Permissions for a submission script
I'm a TA for an introductory Python programming class (all work is done from the terminal), and I'm writing a project submission script. Ideally I want a directory setup like this:
submissions/
...
4
votes
2answers
381 views
Shell script printing the most visited directories
Is there a way to write a bash script with the following functionalities?
Be launched when I press some key or key combination. (not so important requirement)
Identify the 7 most visited directories ...
8
votes
6answers
496 views
Best way run a command on each file in a directory tree
There appear be a number of ways to do this including loops in shell script, find and xargs. Which of these is best, and which is most portable?