Skip to main content

All Questions

Tagged with
1 vote
2 answers
74 views

How can I sort my file by date if there are different number of spaces between the name and date?

How can I sort my file by date if there are different number of spaces between the name and date? My example file: Ivanov 03/01/1980 Petrov 10/05/1992 Sidorov 21/07/1985 Kovtun 15/...
Mykola's user avatar
  • 21
1 vote
2 answers
126 views

What are version and revision of a file?

The docs for the nnn file manager says that nnn is able to sort a list of files on the basis of: apparent disk usage / disk usage / extension / revision / size / time / version But what are the &...
robertspierre's user avatar
1 vote
1 answer
103 views

Difficulty performing complex sorting when listing files in a directory with the ls command

The behavior I'm seeking is a nested sort with the ls command where sorting by one method doesn't cancel out sorting by a second method. The exact desired behavior is essentially: First sort with ...
elucid8's user avatar
  • 78
0 votes
1 answer
773 views

UNIX or Linux sort: only sort on the first part of an entry

I'm working on a complicated grep, something like grep -E -i "first|next" *.txt, and I get results like: logs.10.txt:2022-10-07 10:33:05.6673 | ClassName | [Info] | Inside function first(), ...
Dominique's user avatar
  • 2,283
0 votes
1 answer
306 views

Linux shell - Sort on a numerical column

I'm using the linux shell in a jupyter notebook. I'm trying to filter rows of a .csv file to only keep those including 'Government expenditure on education, total (% of GDP)', then to only keep ...
robgaillard27's user avatar
0 votes
1 answer
50 views

Sorting the list of subnets as Integers ascending

I have a list of subnets for eg. 180.151.96.0/22 180.151.240.0/21 119.82.112.0/22 203.122.29.0/24 203.122.48.0/22 119.82.92.0/24 180.151.108.0/23 119.82.124.0/24 119.82.89.0/24 180.151.17.0/24 119.82....
ph3ro's user avatar
  • 143
0 votes
1 answer
1k views

How to sort output of top command based on nice value?

We can use Shift+p to sort on basic of cpu usage, Shift+r to sort on basis of pid & Shift+m on basis of memory utilisation. How to sort output of top command based on nice value?
user avatar
0 votes
1 answer
2k views

Linux `sort` doesn't work on numeric field

Here is a sample text file: Peter:123777:ETA Joan:16466:HLT John:11223:HR David:23456::::FSI George::::876543:ECS The task is to sort on second field, so I did the below: cat input.txt | tr -...
TheGameiswar's user avatar
0 votes
0 answers
37 views

sort games in their subfolders

Recently I started using Batocera, and I am collecting games. I found on my drive tons of amiga games, which in most cases are in multiple files e.g. samurai1.adf samurai2.adf Battleships.adf exile - ...
Mikołaj Zdanowicz's user avatar
0 votes
1 answer
2k views

How to sort text by last column?

This command udisksctl status with Ubuntu 20.04.3 gives: MODEL REVISION SERIAL DEVICE -------------------------------------------------------------------------- ...
user1539864's user avatar
0 votes
1 answer
714 views

How to replicate windows name sorting in linux?

I need to print a list of files to a text document in the same order they show in the windows explorer alphabetic sort, but I can't find any method of sorting with ls | sort that shows the exact same ...
metichi's user avatar
  • 101
0 votes
1 answer
70 views

Sorting a text file based on data before the first comma

I have the following text file that contains rows in a format of [Number,IP address] and want to sort it based on the number portion. I tried using the command sort -r -k 1 -t"," Input.txt &...
Zachary Zangiaracina's user avatar
1 vote
2 answers
311 views

How may I sort strings with more than one pre-requirement?

I have bunch of strings (around ~300) and they are all 4 letter such as XYZA, ZHF3, RTt2 etc. I want to sort them depending on the 2 requirement. Sort them in order of last 2 letters Sort the words ...
Emre Uygun's user avatar
0 votes
1 answer
88 views

How to sort network devices with VLANs by numeric order

I'm trying to create a neat and tidy motd for some embedded devices that will have multiple NICs and VLANs. Here's a sample output: Networking sent recv tx-err rx-err address enp7s0 UP 66K ...
user247243's user avatar
2 votes
1 answer
155 views

merging files in numerical order ubuntu

Hy everyone! I have a list of 100 numerical files 1.txt 2.txt...n.txt I want to merge their content to an output.txt , but would like to keep their numerical order, such as my output file would ...
subparuser's user avatar

15 30 50 per page
1
2 3 4 5 6