LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-15-2018, 10:46 PM   #1
Kavita Arora
LQ Newbie
 
Registered: Aug 2018
Posts: 1

Rep: Reputation: Disabled
working on NS2


I am working on NS2 and the platform is Ubuntu.

After writing a small code when I tried to run it, the file didn't run.

when to check, i wrote cd ns*, the command prompt showed the message that bash: cd: ns is not a directory.

What is the right procedure to start with, please suggest.
 
Old 08-16-2018, 06:39 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by Kavita Arora View Post
I am working on NS2 and the platform is Ubuntu.

After writing a small code when I tried to run it, the file didn't run.

when to check, i wrote cd ns*, the command prompt showed the message that bash: cd: ns is not a directory.

What is the right procedure to start with, please suggest.
Welcome to LQ.

Please read the link in my signature discussing how to use the Linux Questions site.

Your question refers to code you've written, as well as NS2 and Ubuntu. You should inform your fellow LQ members what versions of Ubuntu and NS2 you are working with and you should post the code you've written using [code] tags. There is another link in my signature which describes how to use [code] tags if you have trouble.

You also need to indicate better any errors you received when trying to run the file. Meanwhile, perhaps all that is needed is that the file may need to be executable permissions (I don't know, that is a guess on my part).

The part where you mentioned that you tried to cd into a non-existent directory using a wildcard "ns*" is a concern because it seems to demonstrate that you do not understand fundamental Linux command line commands.

Please take the time to learn about the command line and basic Linux commands. There are plenty of online guides for this.

What I can tell you is that there is at least one or two members who regularly are on the LQ forums who are very capable with NS2 and offer a great deal of help. Meanwhile, you should be aware of the needs I've stated above, to properly describe your environment and problem, and to also be aware how to use the command line.
 
Old 08-16-2018, 07:34 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
@Kavita Arora, welcome to LQ.

You cannot compile a single file in ns2.
You can add / change a file.cc .
If added, then add a file.o to the ns-2.35/Makefile.in (line 335)
... and run the command './install' in ns-allinone-2.35/.

Saving the new executable "ns" :
Code:
cd ns-2.35/
cp ns ns-new
sudo copy ns-new /usr/local/bin/     // i.e. a system path

----- Simulation --------
ns-new simulation.tcl
Attached Files
File Type: txt ns2-INFO.txt (1.3 KB, 9 views)

Last edited by knudfl; 08-16-2018 at 07:38 AM.
 
  


Reply

Tags
ns2



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cross-layering not working in ns2.34 hamdan Linux - Wireless Networking 7 02-04-2015 05:56 AM
nam not working ns2.33 fabe856 Linux - Software 3 04-20-2012 01:03 PM
Working with ns2-34 kozomoja Linux - Newbie 0 12-23-2011 09:08 AM
[SOLVED] ns2 nam not working in fedora 14 mujtiba Linux - Newbie 7 05-24-2011 07:30 AM
working with ns2 in Ubuntu 8.1 neeraj.dwivedi Linux - Newbie 5 11-16-2009 09:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration