LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   scripts (https://www.linuxquestions.org/questions/linux-newbie-8/scripts-4175579184/)

cellranking 05-06-2016 09:41 PM

scripts
 
Hi
room

I want to write script to check my file size sort largest size and older date.

Please help :(:(

Michael Uplawski 05-07-2016 01:03 AM

Quote:

Originally Posted by cellranking (Post 5541643)
I want to write script to check my file size sort largest size and older date.

Where are you stuck?

grail 05-07-2016 04:52 AM

The 'room' will be waiting to see some effort.

HMW 05-07-2016 09:38 AM

I fail to see why you'd need a script for this. Check out
Code:

man ls
Especially the
Code:

-S
And the
Code:

-t
Options.

Best regards,
HMW

TB0ne 05-07-2016 06:15 PM

Quote:

Originally Posted by cellranking (Post 5541643)
Hi room

I want to write script to check my file size sort largest size and older date.

Great...so if you want to write a script, then proceed to do so. We are happy to help you, but we will NOT write it for you. Read the "Question Guidelines" link.

JJJCR 05-08-2016 09:47 PM

Quote:

Originally Posted by cellranking (Post 5541643)
Hi
room

I want to write script to check my file size sort largest size and older date.

Please help :(:(

LQ has a search button at the menu bar.

Use it and it awesome results will come out.

Here's one: http://www.linuxquestions.org/questi...e-name-915164/

Keyword used: "largest size script"

BW-userx 05-09-2016 07:21 AM

taking @HMW suggestion

Code:

#!/bin/bash
ls -S ~/

then save it using some from of filename of your choice, then change it to make is an executable
Code:

chmod +x {filename}
then run it off the command line
Code:

./filename
then you can use that little bit to build off of...

happy scripting


All times are GMT -5. The time now is 07:13 PM.