Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Want to remove all lines but not latest 50 lines from a file Post 302867797 by vbe on Friday 25th of October 2013 04:39:24 AM
Old 10-25-2013
50 or 50000 ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

remove lines from file

file: 1 xxxxxxx 2 xxx xxx 5 xxx xxx ... 180 xxxxxx 200 xxx how to remove any lines with the first number range 1-180 (9 Replies)
Discussion started by: bluemoon1
9 Replies

2. Shell Programming and Scripting

To remove the lines in my file

Hi, There seems to some hack attempts in my site. I have attached the index page of my site and I need to remove the below lines from the index page. The below lines are at the center of the file. --> </style> <script>E V A L( unescape(... (5 Replies)
Discussion started by: gsiva
5 Replies

3. UNIX for Dummies Questions & Answers

vi to remove lines in file

All, I have a text file with several entries like below: personname personname.domain.com I know there is a way to use vi to remove only the personname.domain.com line. Can someone help? I believe that it involves /s/g/ something...I just can't remember the exact syntax. Thanks (2 Replies)
Discussion started by: kjbaumann
2 Replies

4. Shell Programming and Scripting

remove lines from file

Hi gurus, i'm trying to remove a number of lines from a large file using the following command: sed '1,5000d' oldfile > newfile Somehow the lines in the old file are not deleted... Am I doing this wrongly? Any suggestions? :confused: Thanks! :) wee (10 Replies)
Discussion started by: lweegp
10 Replies

5. Shell Programming and Scripting

remove : lines from file

A small question I have a test.txt file I have contents as: a:google b:yahoo : c:facebook : d:hotmail How do I remove the line with : my output should be a:google b:yahoo c:facebook d:hotmail (5 Replies)
Discussion started by: aronmelon
5 Replies

6. Shell Programming and Scripting

remove blank lines and merge lines in shell

Hi, I'm not a expert in shell programming, so i've come here to take help from u gurus. I'm trying to tailor a csv file that i got to make it work for the LOAD FROM command. I've a datatable csv of the below format - --in file format xx,xx,xx ,xx , , , , ,,xx, xxxx,, ,, xxx,... (11 Replies)
Discussion started by: dvah
11 Replies

7. Shell Programming and Scripting

Remove lines from file

Hey Gang- I have a list of servers. I want to exclude servers that begin with and end with certain characters. Is there an easy command to do this? Example wvm1234dev wvm1234pro uvm1122dev uvm1122bku uvm1344dev I want to exclude any lines that start with "wvm" OR "uvm" AND end... (7 Replies)
Discussion started by: idiotboy
7 Replies

8. Shell Programming and Scripting

Two files, remove lines from second based on lines in first

I have two files, a keepout.txt and a database.csv. They're unsorted, but could be sorted. keepout: user1 buser3 anuser19 notheruser27 database: user1,2343,"information about",field,blah,34 user2,4231,"mo info",etc,stuff,43 notheruser27,4344,"hiya",thing,more thing,423... (4 Replies)
Discussion started by: esoffron
4 Replies

9. Shell Programming and Scripting

Remove lines that are subsets of other lines in File

Hello everyone, Although it seems easy, I've been stuck with this problem for a moment now and I can't figure out a way to get it done. My problem is the following: I have a file where each line is a sequence of IP addresses, example : 10.0.0.1 10.0.0.2 10.0.0.5 10.0.0.1 10.0.0.2... (5 Replies)
Discussion started by: MisterJellyBean
5 Replies

10. Shell Programming and Scripting

awk to remove lines that do not start with digit and combine line or lines

I have been searching and trying to come up with an awk that will perform the following on a converted text file (original is a pdf). 1. Since the first two lines are (begin with) text they are removed 2. if $1 is a number then all text is merged (combined) into one line until the next... (3 Replies)
Discussion started by: cmccabe
3 Replies
gnome-session(1)						   User Commands						  gnome-session(1)

NAME
gnome-session - starts up the GNOME desktop environment SYNOPSIS
gnome-session [--choosesession] [--failsafe] [--purge-delay=delay] [--warn-delay=delay] [--suicide-delay=delay] [session-name] [gnome-std- options] DESCRIPTION
The gnome-session program starts up the GNOME desktop environment. This command is typically executed by your login manager (either gdm, xdm, or from your X startup scripts). It will either load your last session, or provide a default session for the user as defined by the system administrator (or the default GNOME installation on your system). You can optionally specify a specific session name to restore. gnome-session is an X11R6 session manager. It can manage GNOME applications as well as any X11R6 SM compliant sessions. If the user has previously saved a session, the session is loaded from the ~.gnome2/session file. Otherwise, the session is loaded from the /usr/share/gnome/default.session file. Any programs specified in the ~/.gnome2/session/.session-manual will also be started. gnome-session also exports an X Atom called GNOME_SM_DESKTOP on the root window, to indicate that gnome-session has started. Some applica- tions may require such information to proceed correctly. OPTIONS
The following options are supported: --choosesession User can specify a session to load, as opposed to the session specified in the ~/.gnome/session-options file. If that entry does not exist in the ~/.gnome/session file (or if that file does not exist), gnome-session will use the default ses- sion, and all saves to that session will be to the new session name. --failsafe Fail-safe operations mode: gnome-session only reads saved sessions from the default.session file. --purge-delay=deThe number of milliseconds that gnome-session will wait for clients to register. If delay is 0, gnome-session will wait forever. The default value is 30,000 milliseconds. --suicide-delay=Theanumber of milliseconds that gnome-session will wait for clients to die. If delay is 0, gnome-session will wait forever. The default value is 10,000 milliseconds. --warn-delay=delThe number of milliseconds that gnome-session will wait for clients to respond. If delay is 0, gnome-session will wait for- ever. The default value is 10,000 milliseconds. gnome-std-optionStandard options available for use with most GNOME applications. See gnome-std-options(5) for more information. OPERANDS
The following operands are supported: session-name The name of the session to be loaded. EXAMPLES
Example 1: Starting a session named "MySession" example% gnome-session --choose-session=MySession Example 2: Starting the system default session, ignoring the user's session example% gnome-session --failsafe Example 3: Setting the purge delay to 50000ms example% gnome-session --purge-delay=50000 Example 4: Setting the suicide delay to 50000ms example% gnome-session --suicide-delay=50000 Example 5: Setting the warning delay to 50000ms example% gnome-session --warn-delay=50000 ENVIRONMENT VARIABLES
gnome-session accepts all of the standard environment variables used by GNOME programs, as well as the SESSION_MANAGER environment vari- able. gnome-session also sets several environment variables for the use of its child processes. See environ(5) for descriptions of the following environment variables: SESSION_MANAGER Used by session-manager-aware clients to contact gnome-session. DISPLAY Set to the X display being used by gnome-session. Note that the --display option, if specified, overrides the set- ting of the DISPLAY environment variable. EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/gnome-session The command-line executable for the application. /usr/share/gnome/defaultDefaultnsystem session file. ~/.gnome2/session User session file. ~/.gnome2/session/.sessiSpecifies programs to start that do not support session management. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-session | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
gnome-std-options(5), default.session(5), gnome-smproxy(1), gnome-session-save(1) NOTES
Written by Brian Cameron, Sun Microsystems Inc., 2003. SunOS 5.10 13 Jan 2003 gnome-session(1)
All times are GMT -4. The time now is 11:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy