Sponsored Content
Full Discussion: Insert year in ls -l command
Top Forums UNIX for Beginners Questions & Answers Insert year in ls -l command Post 303042682 by RavinderSingh13 on Friday 3rd of January 2020 07:50:23 AM
Old 01-03-2020
Hello kumarinfa,

For Thanking someone on Unix.com you could HIT THANKS button at the left corner of each post.

For your other question in your previous post, I believe my same command should work, though I made a small change in it, try following and let me know then.

Code:
awk '{split($NF,array,"[_]");$NF=array[2] OFS $NF} 1'  Input_file

Thanks,
R. Singh
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

listing year in ls command

Hi all .. As per rule i searched the forum i am not able found out ... I want to display the year in when listing the files .. when i use ls -lt it is not displaying files with recent 6 month old .. I know that perderabo has written a script for that if you give that link it will be... (3 Replies)
Discussion started by: arunkumar_mca
3 Replies

2. Shell Programming and Scripting

Printing Year in ls -ltr command

Hi, When retrieving parameters of a file using ls command i need to print the year part . When i do ls -ltr the following output is displayed -rwxrwxrwx 1 d_infd d_infd 1711 Jan 8 2004 wf1.class. Here the year part is not displayed only Jan 8 is displayed. Can any one... (9 Replies)
Discussion started by: ragugct
9 Replies

3. Shell Programming and Scripting

Last Command not giving year

Hi All, i want the last login details along with year. i tried below command but not giving me the year of last login. last <$Userid> | head -1 i heard that if it is current year then it wont display the year else it will display the year. is it so? if yes then , is there any way of... (1 Reply)
Discussion started by: ani_rvce
1 Replies

4. UNIX for Dummies Questions & Answers

Last Command not giving year

Hi All, i want the last login details along with year. i tried below command but not giving me the year of last login. last <$Userid> | head -1 i heard that if it is current year then it wont display the year else it will display the year. is it so? if yes then , is there any way of... (1 Reply)
Discussion started by: ani_rvce
1 Replies

5. UNIX for Dummies Questions & Answers

sed insert command and variable expansion/command substitution

I know this script is crummy, but I was just messing around.. how do I get sed's insert command to allow variable expansion to show the filename? #!/bin/bash filename=`echo $0` /usr/bin/sed '/#include/ { i\ the filename is `$filename` }' $1 exit 0 (8 Replies)
Discussion started by: glev2005
8 Replies

6. Emergency UNIX and Linux Support

LAST command with Year

Hi Guys, I'm trying to identify the last logins by all the users in the system in AIX. the last command gives me the output, but there is no year displayed for it . Since there is a duplication of months i mean Apr 2010 and Apr 2009 also its giving me inaccurate data.. Is there a way I can filter... (4 Replies)
Discussion started by: kkeng808
4 Replies

7. UNIX for Advanced & Expert Users

unix command : how to insert text at the cursor location via command line?

Hi, Well my title isn't very clear I think. So to understand my goal: I have a script "test1" #!/bin/bash xvkbd -text blabla with xbindkeys, I bind F5 key in order it runs my test1 script So when I press F5, test1 runs. I'm under Emacs/Vi and I press F5 in order to have "blabla" be... (0 Replies)
Discussion started by: xib.be
0 Replies

8. Linux

uptime command output when the server is running more than one year?

What is the uptime command output when the server is running more than one year? My doubt is whether it show in number of days format or number years and number of days format? For example, Assume the server is running 400 days 3 hrs 3 min 3 secs. The output like 400 days 3:3 min or 1 year 5... (3 Replies)
Discussion started by: maruthu
3 Replies

9. UNIX for Dummies Questions & Answers

Unix man command to find out month of the year?

how can i display month of the year i was born with using man command? thanks (2 Replies)
Discussion started by: janetroop95
2 Replies

10. UNIX for Dummies Questions & Answers

Command to print previous year in UNIX

hi all, I use date +%Y which gives Current year. Requirement: I want previous year to be printed. Please help me. Note: I tried date +%d/%m/%Y -d "-1 years" which is not working. (10 Replies)
Discussion started by: wasim999
10 Replies
XDEMINEUR(6x)															     XDEMINEUR(6x)

NAME
xdemineur - X11 minesweeper game SYNOPSIS
xdemineur [-v] [-display displayname] [-geometry geom] [-m mines] DESCRIPTION
Xdemineur is a minesweeper game for the X Window System. The object of this game is to find the location of the mines hidden in the minefield and to mark their location by placing a warning flag. You have exactly as many flags as there are mines. The number of flags that remain to be placed is displayed in the top left corner of the window and a timer is displayed in the top right corner. The game is played using a three buttons mouse, as usual with the X Window System. The left button (button 1) is used to uncover the square on which you click (hoping that a mine is not hidden there). The number displayed in an uncovered square indicates how many mines are located around this square (for example, a 3 means that there are three mines within the 8 surrounding squares). The whole game relies on the right use of these numbers. The right button (button 3) is used to place a flag on a square (this indicates that there is a mine here). If you click again with the right button on a square that has a flag, the flag is changed into a question mark: this is useful if you are trying to guess the possible location of some mine, you can use question marks to think about it. One more click with the right button and the question mark disappears. Clicking with the middle button (button 2) on an uncovered square which has all its flags placed around uncovers the surrounding cells which have no flags (this will save a lot of time). Finally, to start a new game, just click on the yellow face above the minefield. OPTIONS
-v Print out version number and copyright notice then exit. -display displayname This option specifies the name of the X server to use. See X(1). -geometry geom This option specifies the initial size and location of the window. See X(1). The size is expressed in number of columns times num- ber of rows. The default is 30x16. The minimum number of columns is 12. -m mines This option specifies the number of mines in the minefield. If there are more mines than squares in the minefield, the default mine number is used. BUGS
Please report any bug you could find in xdemineur to <babafou@babafou.eu.org>. Also, you should tell me the customizations you may have done, such as adding new functions to the game or making modifications to allow the game to run on your system. COPYRIGHT
Copyright (C) 1993-1999 Marc Baudoin <babafou@babafou.eu.org> Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, pro- vided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in sup- porting documentation. The author makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. AUTHOR
Marc Baudoin <babafou@babafou.eu.org> XDEMINEUR(6x)
All times are GMT -4. The time now is 05:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy