Ask Your Question
0

Command for creating new file / document

asked 2018-11-17 05:19:09 -0500

OsManiaC gravatar image

Hi!

I couldn't create a new file in a folder using ros command line in terminal. Is there any /roscommand for that?

  • I can easily create in explorer for new document
  • I can easily create in cpp or python ide.
  • I just want to see if I can create without leaving the terminal
edit retag flag offensive close merge delete

Comments

2

Does touch <filename> do what you want?

This doesn't seem like a ROS question though.

gvdhoorn gravatar imagegvdhoorn ( 2018-11-17 05:27:46 -0500 )edit

Thank you, As I mentioned in my question I tried to find if there was a ros command for that. It seems there is not. gedit new_file just works well. Also vi works somehow

OsManiaC gravatar imageOsManiaC ( 2018-11-18 23:35:42 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-11-19 01:56:06 -0500

gvdhoorn gravatar image

Afaik, there is no "ROS command" to create a new file.

I also believe that would not be very useful:

  • it would increase maintenance for ROS (core) maintainers
  • managing files is a task for the OS, which has plenty of tools/utilities to do that
  • using existing tools instead of introducing something new allows users to reuse their experience and doesn't invalidate their expectations around such tools

A quick way to create a new file in an arbitrary package (in your workspace of course) could be something like:

rospd <package_name>
touch my_new_file
rospd

To then edit that file:

rosed <package_name> my_new_file

See also the rosbash documentation.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-11-17 05:19:09 -0500

Seen: 97 times

Last updated: Nov 19 '18