latqr.blogg.se

C shell solaris find files by date
C shell solaris find files by date





c shell solaris find files by date
  1. #C SHELL SOLARIS FIND FILES BY DATE UPDATE#
  2. #C SHELL SOLARIS FIND FILES BY DATE FULL#
  3. #C SHELL SOLARIS FIND FILES BY DATE ISO#

By default it will take the current system time and update the atime field.īefore touch command is executed: $ stat tgs.txt We can change the access time of a file using -a option. %Z alphabetic time zone abbreviation (e.g., EDT)įor more details, refer man pages.$ touch a b c d 2. %:::z numeric time zone with : to necessary precision (e.g., -04, +05:30) %X locale's time representation (e.g., 23:13:48) %x locale's date representation (e.g., 12/31/99) %W week number of year, with Monday as first day of week (00.53)

#C SHELL SOLARIS FIND FILES BY DATE ISO#

%V ISO week number, with Monday as first day of week (01.53) %U week number of year, with Sunday as first day of week (00.53) %p locale's equivalent of either AM or PM blank if not known %l hour, space padded ( 1.12) same as %_I %k hour, space padded ( 0.23) same as %_H %G year of ISO week number (see %V) normally useful only with %V %g last two digits of year of ISO week number (see %G) %e day of month, space padded same as %_d %C century like %Y, except omit last two digits (e.g., 20)

#C SHELL SOLARIS FIND FILES BY DATE FULL#

%B locale's full month name (e.g., January) %b locale's abbreviated month name (e.g., Jan) %A locale's full weekday name (e.g., Sunday) %a locale's abbreviated weekday name (e.g., Sun) Here is the list of supported operators that you can use to name the directories with current day, month, time, year, day of week, day of the month, time zone etc. To create a directory with name of current month (i.e October), run: $ mkdir "$(date +%B)"

c shell solaris find files by date

The above command will create a directory named "Saturday" i.e today's name.Ĭreate directory with name of current day What if you want to name the directories with actual name of the current day/month like Sunday, October etc? It's simple! $ mkdir "$(date +%A)" In all of the above examples, we created the directories with numbers on their names. To name directory with current minutes, use uppercase M: $ mkdir "$(date +%M)" For example, the following command will create a directory and name it with current second.

c shell solaris find files by date

We can even create directories with current minutes and seconds in the name. This command will create a folder and name it with current time in hh:mm:ss format.

c shell solaris find files by date

How about directories name with current time? It is also possible. This command will name the directories with the last two digits of current year i.e 20. Similarly, you can create directories with current month-only in the name: $ mkdir "$(date +%m)" This command will only create the directory with current day in the name. If you want only day of the current date, use: $ mkdir "$(date +%d)" To create files, just replace mkdir with touch command. ) and ls will list them in date order, run: $ mkdir $(date -I)Īll of the above three commands will produce the same result. To create a file with custom name: $ touch -$(date +"%d-%m-%Y") Create Directories Of Files With ISO Format Create directories or files with custom name with current date







C shell solaris find files by date